mirror of
https://github.com/snipe/snipe-it.git
synced 2026-08-18 11:15:42 +00:00
Fix division by zero?
This commit is contained in:
@ -170,6 +170,10 @@ class Consumable extends SnipeModel
|
||||
return 100;
|
||||
}
|
||||
|
||||
if ($this->qty == '') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return ($this->qty - $this->consumables_users_count) / $this->qty * 100;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user