1
0
Fork 0
mirror of synced 2024-10-03 19:53:33 +13:00

Fix invalid coalesce

This commit is contained in:
Jake Barnby 2024-01-15 18:26:30 +13:00
parent 189406635a
commit 78fe9ebb37
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -20,6 +20,7 @@ use Utopia\Database\Exception\Authorization;
use Utopia\Database\Exception\Conflict;
use Utopia\Database\Exception\Restricted;
use Utopia\Database\Exception\Structure;
use Utopia\Database\Exception as DatabaseException;
use Utopia\Database\Query;
use Utopia\Platform\Action;
use Utopia\Queue\Message;
@ -163,9 +164,13 @@ class Deletes extends Action
* @param Database $dbForConsole
* @param callable $getProjectDB
* @param string $datetime
* @param Document|null $document
* @return void
* @throws Authorization
* @throws Throwable
* @throws Conflict
* @throws Restricted
* @throws Structure
* @throws DatabaseException
*/
private function deleteSchedules(Database $dbForConsole, callable $getProjectDB, string $datetime, ?Document $document = null): void
{
@ -173,7 +178,7 @@ class Deletes extends Action
'schedules',
[
Query::equal('region', [App::getEnv('_APP_REGION', 'default')]),
Query::equal('resourceType', [$document ?? $document->getAttribute('resourceType')]),
Query::equal('resourceType', [$document->getAttribute('resourceType')]),
Query::lessThanEqual('resourceUpdatedAt', $datetime),
Query::equal('active', [false]),
],