diff --git a/InvenTree/part/forms.py b/InvenTree/part/forms.py index 5f6a34ce51..e8847fef93 100644 --- a/InvenTree/part/forms.py +++ b/InvenTree/part/forms.py @@ -215,6 +215,7 @@ class EditPartForm(HelperForm): class Meta: model = Part fields = [ + 'confirm_creation', 'category', 'selected_category_templates', 'parent_category_templates', @@ -224,7 +225,6 @@ class EditPartForm(HelperForm): 'revision', 'bom_copy', 'parameters_copy', - 'confirm_creation', 'keywords', 'variant_of', 'link', diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 8501fc82b3..4730ba1e9c 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -350,7 +350,7 @@ class Part(MPTTModel): # Get part category category = self.category - if add_category_templates: + if category and add_category_templates: # Store templates added to part template_list = []