Fixed locations isDeletable check

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-02-20 16:40:09 +00:00
parent db73f80058
commit a6a65b7523

View file

@ -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);
}