Skip to content

Commit 795f171

Browse files
authored
Merge pull request #86 from nextcloud/fix/proper_data_resp
Do not call invalid function
2 parents 717edbf + 4c98287 commit 795f171

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/BackgroundJobs/MonthlyReport.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
use OC\BackgroundJob\TimedJob;
2525
use OCA\Survey_Client\AppInfo\Application;
26+
use OCP\AppFramework\Http;
2627

2728
class MonthlyReport extends TimedJob {
2829

@@ -40,7 +41,7 @@ protected function run($argument) {
4041
$collector = $application->getContainer()->query('OCA\Survey_Client\Collector');
4142
$result = $collector->sendReport();
4243

43-
if (!$result->succeeded()) {
44+
if ($result->getStatus() !== Http::STATUS_OK) {
4445
\OC::$server->getLogger()->info('Error while sending usage statistic');
4546
}
4647
}

0 commit comments

Comments
 (0)