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); } /**