mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Return on Dependency
This commit is contained in:
parent
9f82cd78fb
commit
6067fb77b7
1 changed files with 5 additions and 10 deletions
|
|
@ -14,6 +14,7 @@ use Utopia\Database\Exception\Conflict;
|
|||
use Utopia\Database\Exception\NotFound;
|
||||
use Utopia\Database\Exception\Restricted;
|
||||
use Utopia\Database\Exception\Structure;
|
||||
use Utopia\Database\Exception\Dependency;
|
||||
use Utopia\Database\Query;
|
||||
use Utopia\Logger\Log;
|
||||
use Utopia\Platform\Action;
|
||||
|
|
@ -278,16 +279,6 @@ class Databases extends Action
|
|||
$dbForProject->deleteDocument('attributes', $relatedAttribute->getId());
|
||||
}
|
||||
|
||||
} catch (DatabaseException\Dependency $e) {
|
||||
Console::error($e->getMessage());
|
||||
|
||||
$attribute->setAttribute('status', 'available');
|
||||
$attribute->setAttribute('error', $e->getMessage());
|
||||
|
||||
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute);
|
||||
|
||||
return;
|
||||
|
||||
} catch (NotFound $e) {
|
||||
Console::error($e->getMessage());
|
||||
|
||||
|
|
@ -319,6 +310,10 @@ class Databases extends Action
|
|||
);
|
||||
}
|
||||
|
||||
if ($e instanceof Dependency) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw $e;
|
||||
} finally {
|
||||
$this->trigger($database, $collection, $attribute, $project, $projectId, $events);
|
||||
|
|
|
|||
Loading…
Reference in a new issue