From b64d48544decbfaf5e709d93e18e44ab0da8127f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 23 Feb 2021 16:49:09 +1100 Subject: [PATCH] Bug fix for trackable parts --- InvenTree/part/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index c1dbb454b4..468ceb8cfc 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -643,12 +643,12 @@ class Part(MPTTModel): super().clean() if self.trackable: - for item in self.get_used_in().all(): - parent_part = item.part - if not parent_part.trackable: - parent_part.trackable = True - parent_part.clean() - parent_part.save() + for part in self.get_used_in().all(): + + if not part.trackable: + part.trackable = True + part.clean() + part.save() name = models.CharField( max_length=100, blank=False,