mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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();
|
return $this->components()->count();
|
||||||
case 'consumable':
|
case 'consumable':
|
||||||
return $this->consumables()->count();
|
return $this->consumables()->count();
|
||||||
|
case 'license':
|
||||||
|
return $this->licenses()->count();
|
||||||
}
|
}
|
||||||
return '0';
|
return '0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue