Fix for scheduled reports

This commit is contained in:
Hillel Coren 2018-03-20 20:39:53 +02:00
parent b814e5281f
commit 7a1c5adc6e

View File

@ -69,10 +69,6 @@ class RunReport extends Job
$report = new $reportClass($startDate, $endDate, $isExport, $config); $report = new $reportClass($startDate, $endDate, $isExport, $config);
$report->run(); $report->run();
if (App::runningInConsole() && $this->user) {
auth()->logout();
}
$params = [ $params = [
'startDate' => $startDate, 'startDate' => $startDate,
'endDate' => $endDate, 'endDate' => $endDate,
@ -81,6 +77,10 @@ class RunReport extends Job
$report->exportParams = array_merge($params, $report->results()); $report->exportParams = array_merge($params, $report->results());
if (App::runningInConsole() && $this->user) {
auth()->logout();
}
return $report; return $report;
} }
} }