Use proper types in Import Export
[MAILPOET-2535]
This commit is contained in:
committed by
Jack Kitterhing
parent
bd6929bbe8
commit
8e1628efe8
@ -88,12 +88,12 @@ class ImportExport extends APIEndpoint {
|
||||
if (($task instanceof ScheduledTask) && $task->status === null) {
|
||||
return $this->successResponse();
|
||||
}
|
||||
if (!$task) {
|
||||
if (!($task instanceof ScheduledTask)) {
|
||||
$task = ScheduledTask::create();
|
||||
$task->type = WooCommerceSync::TASK_TYPE;
|
||||
$task->status = ScheduledTask::STATUS_SCHEDULED;
|
||||
}
|
||||
$task->scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'));
|
||||
$task->scheduled_at = Carbon::createFromTimestamp((int)current_time('timestamp'));
|
||||
$task->save();
|
||||
return $this->successResponse();
|
||||
} catch (\Exception $e) {
|
||||
|
Reference in New Issue
Block a user