mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Prevent license categories from being deleted if there are licenses in that category
This commit is contained in:
parent
68487e1200
commit
0286cf6d46
|
@ -165,6 +165,8 @@ class Category extends SnipeModel
|
|||
return $this->components()->count();
|
||||
case 'consumable':
|
||||
return $this->consumables()->count();
|
||||
case 'license':
|
||||
return $this->licenses()->count();
|
||||
}
|
||||
return '0';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue