diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index 6510461eee..56f5f012e8 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -116,6 +116,11 @@ class Databases extends Action */ $attribute = $dbForProject->getDocument('attributes', $attribute->getId()); + if ($attribute->isEmpty()) { + // Attribute was deleted before job was processed + return; + } + $collectionId = $collection->getId(); $key = $attribute->getAttribute('key', ''); $type = $attribute->getAttribute('type', ''); @@ -176,7 +181,6 @@ class Databases extends Action } } - $dbForProject->updateDocument( 'attributes', $attribute->getId(),