Skip to content

A free open source IT asset/license management system

Prevent license categories from being deleted if there are licenses in that category

snipe0286cf6d469e
diff --git a/app/Models/Category.php b/app/Models/Category.php
index ae60a1d735..ad21f15b48 100755
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -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';
}