mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #283 from SchrodingersGat/can-build
If a part has no bom items, the 'can_build' function now returns zero
This commit is contained in:
commit
a94f4baa55
@ -284,7 +284,7 @@ class Part(models.Model):
|
|||||||
|
|
||||||
# If this part does NOT have a BOM, result is simply the currently available stock
|
# If this part does NOT have a BOM, result is simply the currently available stock
|
||||||
if not self.has_bom:
|
if not self.has_bom:
|
||||||
return self.available_stock
|
return 0
|
||||||
|
|
||||||
total = None
|
total = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user