Fix scheduling tasks on activation

[MAILPOET-2686]

Co-authored-by: brezocordero <brezo.cordero@automattic.com>
This commit is contained in:
Rostislav Wolný
2021-10-26 08:54:58 +02:00
committed by Veljko V
parent 4fe8e54180
commit 586443e13c

View File

@@ -663,7 +663,7 @@ class Populator {
private function scheduleTask($type, $datetime) {
$task = ScheduledTask::where('type', $type)
->whereRaw('status = ? OR status IS NULL', [ScheduledTask::STATUS_SCHEDULED])
->whereRaw('(status = ? OR status IS NULL)', [ScheduledTask::STATUS_SCHEDULED])
->findOne();
if ($task) {
return true;