From 02b0c0831d56b8aa526978e85a9f6b3dc2ec7a1e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 17 May 2020 22:29:07 +1000 Subject: [PATCH] Removed test that caused a bug --- InvenTree/stock/models.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 4df61b0ee3..ad2382c3e6 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -276,10 +276,6 @@ class StockItem(MPTTModel): # Serial numbered items cannot be deleted on depletion self.delete_on_deplete = False - # A template part cannot be instantiated as a StockItem - if self.part.is_template: - raise ValidationError({'part': _('Stock item cannot be created for a template Part')}) - except PartModels.Part.DoesNotExist: # This gets thrown if self.supplier_part is null # TODO - Find a test than can be perfomed...