1
0
Fork 0
mirror of synced 2024-08-22 21:52:17 +12:00

fix: reviews

This commit is contained in:
Binyamin Yawitz 2024-07-01 10:23:39 -04:00
parent 87c7da0efa
commit 30db70fe80
No known key found for this signature in database

View file

@ -2090,15 +2090,13 @@ App::delete('/v1/functions/:functionId/executions/:executionId')
} }
if ($status === 'scheduled') { if ($status === 'scheduled') {
$results = $dbForConsole->find('schedules', [ $schedule = $dbForConsole->findOne('schedules', [
Query::equal('resourceId', [$execution->getId()]), Query::equal('resourceId', [$execution->getId()]),
Query::equal('resourceType', [ScheduleExecutions::getSupportedResource()]), Query::equal('resourceType', [ScheduleExecutions::getSupportedResource()]),
Query::equal('active', [true]), Query::equal('active', [true]),
]); ]);
if (count($results) === 1) { if ($schedule && !$schedule->isEmpty()) {
$schedule = $results[0];
$schedule $schedule
->setAttribute('resourceUpdatedAt', DateTime::now()) ->setAttribute('resourceUpdatedAt', DateTime::now())
->setAttribute('active', false); ->setAttribute('active', false);