From 1a115104d23baeef3af9635a6d6e1bc7468236b2 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 9 May 2019 18:35:55 +1000 Subject: [PATCH] If a part has no bom items, the 'can_build' function now returns zero --- InvenTree/part/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index deaf2a799a..40eac96a81 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -284,7 +284,7 @@ class Part(models.Model): # If this part does NOT have a BOM, result is simply the currently available stock if not self.has_bom: - return self.available_stock + return 0 total = None