Update src/Appwrite/Migration/Version/V19.php

Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
This commit is contained in:
Christy Jacob 2023-09-06 23:32:49 -04:00 committed by GitHub
parent 438e7b66d1
commit b9675f736b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -707,7 +707,7 @@ class V19 extends Migration
$commands = $this->getFunctionCommands($document);
$document->setAttribute('commands', $document->getAttribute('commands', $commands));
if ($document->getAttribute('schedule') && !$document->getAttribute('scheduleId', null)) {
if (empty($document->getAttribute('scheduleId', null))) {
$schedule = $this->consoleDB->createDocument('schedules', new Document([
'region' => App::getEnv('_APP_REGION', 'default'), // Todo replace with projects region
'resourceType' => 'function',