diff --git a/app/Livewire/Project/Shared/Tags.php b/app/Livewire/Project/Shared/Tags.php index 42c56d3a1..dca6180ff 100644 --- a/app/Livewire/Project/Shared/Tags.php +++ b/app/Livewire/Project/Shared/Tags.php @@ -82,9 +82,8 @@ public function deleteTag(string $id) { try { $this->resource->tags()->detach($id); - $found_more_tags = Tag::ownedByCurrentTeam()->find($id); - if ($found_more_tags->applications()->count() == 0 && $found_more_tags->services()->count() == 0) { + if ($found_more_tags && $found_more_tags->applications()->count() == 0 && $found_more_tags->services()->count() == 0) { $found_more_tags->delete(); } $this->refresh(); @@ -96,6 +95,7 @@ public function deleteTag(string $id) public function refresh() { + $this->resource->refresh(); // Remove this when legacy_model_binding is false $this->loadTags(); $this->reset('newTags'); } diff --git a/resources/views/livewire/project/database/configuration.blade.php b/resources/views/livewire/project/database/configuration.blade.php index aa5b8ec5e..652aec3eb 100644 --- a/resources/views/livewire/project/database/configuration.blade.php +++ b/resources/views/livewire/project/database/configuration.blade.php @@ -99,7 +99,7 @@
- +