diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index ea2b6a2b73..5b73e6a75c 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -11,7 +11,6 @@ use Utopia\Database\Document; use Utopia\Database\Exception as DatabaseException; use Utopia\Database\Exception\Authorization; use Utopia\Database\Exception\Conflict; -use Utopia\Database\Exception\Dependency; use Utopia\Database\Exception\NotFound; use Utopia\Database\Exception\Restricted; use Utopia\Database\Exception\Structure; @@ -293,18 +292,16 @@ class Databases extends Action if ($e instanceof DatabaseException) { $attribute->setAttribute('error', $e->getMessage()); - if (! $relatedAttribute->isEmpty()) { + if (!$relatedAttribute->isEmpty()) { $relatedAttribute->setAttribute('error', $e->getMessage()); } } - $dbForProject->updateDocument( 'attributes', $attribute->getId(), $attribute->setAttribute('status', 'stuck') ); - - if (! $relatedAttribute->isEmpty()) { + if (!$relatedAttribute->isEmpty()) { $dbForProject->updateDocument( 'attributes', $relatedAttribute->getId(), @@ -312,10 +309,6 @@ class Databases extends Action ); } - if ($e instanceof Dependency) { - return; - } - throw $e; } finally { $this->trigger($database, $collection, $attribute, $project, $projectId, $events);