Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix getting category's descendants before save

Marcin Gębalac9f7c36e8f6b
diff --git a/saleor/dashboard/category/forms.py b/saleor/dashboard/category/forms.py
index 1ba4f98ea7..689feb9211 100644
--- a/saleor/dashboard/category/forms.py
+++ b/saleor/dashboard/category/forms.py
@@ -26,5 +26,6 @@ class CategoryForm(forms.ModelForm):
def save(self, commit=True):
self.instance.slug = slugify(unidecode(self.instance.name))
+ super(CategoryForm, self).save(commit=commit)
self.instance.set_hidden_descendants(self.cleaned_data['hidden'])
- return super(CategoryForm, self).save(commit=commit)
+ return self.instance