From 0d0984a400c0fb86e9c0a1c3035ad3faa5bb725f Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 19 Mar 2024 14:26:40 -0700 Subject: [PATCH] Bulk Delete Locations does not work [sc-25100] --- app/Models/Location.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Models/Location.php b/app/Models/Location.php index 2965ff2fc0..a27f760ea6 100755 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -106,11 +106,12 @@ class Location extends SnipeModel */ public function isDeletable() { + return Gate::allows('delete', $this) - && ($this->assets_count === 0) - && ($this->assigned_assets_count === 0) - && ($this->children_count === 0) - && ($this->users_count === 0); + && ($this->assets_count == 0) + && ($this->assigned_assets_count == 0) + && ($this->children_count == 0) + && ($this->users_count == 0); } /**