From a6a65b75230753a6b5176dd551df7b03c98c8dc9 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 20 Feb 2024 16:40:09 +0000 Subject: [PATCH] Fixed locations isDeletable check Signed-off-by: snipe --- app/Models/Location.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Models/Location.php b/app/Models/Location.php index 145d6cef9a..1122b5da15 100755 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -106,6 +106,7 @@ class Location extends SnipeModel return Gate::allows('delete', $this) && ($this->assignedAssets()->count() === 0) && ($this->assets()->count() === 0) + && ($this->children()->count() === 0) && ($this->users()->count() === 0); }