Merge pull request #8094 from appwrite/fix-missing-id-attribute

Fix missing id attribute error
This commit is contained in:
Jake Barnby 2024-05-08 21:31:04 +12:00 committed by GitHub
commit 637c3fb8c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(),