Skip to content

Commit

Permalink
Don't try to delete metadata document after deleting metadata table
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed May 9, 2024
1 parent 36ea477 commit e1df828
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,11 @@ public function deleteCollection(string $id): bool

$this->adapter->deleteCollection($id);

$deleted = $this->silent(fn () => $this->deleteDocument(self::METADATA, $id));
if ($id === self::METADATA) {
$deleted = true;
} else {
$deleted = $this->silent(fn () => $this->deleteDocument(self::METADATA, $id));
}

if ($deleted) {
$this->trigger(self::EVENT_COLLECTION_DELETE, $collection);
Expand Down

0 comments on commit e1df828

Please sign in to comment.