mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Check for accessories on bulk items
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
5546ab08c2
commit
889d5da71e
|
@ -248,6 +248,7 @@ class LocationsController extends Controller
|
|||
->withCount('rtd_assets as rtd_assets_count')
|
||||
->withCount('children as children_count')
|
||||
->withCount('users as users_count')
|
||||
->withCount('checkouts as accessories_count')
|
||||
->findOrFail($id);
|
||||
|
||||
if (! $location->isDeletable()) {
|
||||
|
|
|
@ -111,6 +111,7 @@ class Location extends SnipeModel
|
|||
&& ($this->assets_count === 0)
|
||||
&& ($this->assigned_assets_count === 0)
|
||||
&& ($this->children_count === 0)
|
||||
&& ($this->accessories_count === 0)
|
||||
&& ($this->users_count === 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue