Check the return value properly
[MAILPOET-2535]
This commit is contained in:
committed by
Jack Kitterhing
parent
3a9a98b842
commit
52b81478fb
@@ -85,7 +85,7 @@ class ImportExport extends APIEndpoint {
|
||||
$task = ScheduledTask::where('type', WooCommerceSync::TASK_TYPE)
|
||||
->whereRaw('status = ? OR status IS NULL', [ScheduledTask::STATUS_SCHEDULED])
|
||||
->findOne();
|
||||
if ($task && $task->status === null) {
|
||||
if (($task instanceof ScheduledTask) && $task->status === null) {
|
||||
return $this->successResponse();
|
||||
}
|
||||
if (!$task) {
|
||||
|
Reference in New Issue
Block a user