Fixed locations isDeletable check
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
db73f80058
commit
a6a65b7523
1 changed files with 1 additions and 0 deletions
|
@ -106,6 +106,7 @@ class Location extends SnipeModel
|
||||||
return Gate::allows('delete', $this)
|
return Gate::allows('delete', $this)
|
||||||
&& ($this->assignedAssets()->count() === 0)
|
&& ($this->assignedAssets()->count() === 0)
|
||||||
&& ($this->assets()->count() === 0)
|
&& ($this->assets()->count() === 0)
|
||||||
|
&& ($this->children()->count() === 0)
|
||||||
&& ($this->users()->count() === 0);
|
&& ($this->users()->count() === 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue