diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 61783fc8fb..86bb256539 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -1292,7 +1292,7 @@ class BuildItem(models.Model): user, notes ) - + else: # Simply remove the items from stock item.take_stock( diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index f6b21ca5af..c88c29e64e 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -1165,7 +1165,7 @@ class StockItemTestResultList(generics.ListCreateAPIView): build = params.get('build', None) if build is not None: - + try: build = Build.objects.get(pk=build) @@ -1174,7 +1174,6 @@ class StockItemTestResultList(generics.ListCreateAPIView): except (ValueError, Build.DoesNotExist): pass - # Filter by stock item item = params.get('stock_item', None)