Skip to content

A free open source IT asset/license management system

Bulk Delete Locations does not work [sc-25100]

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