Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix saved_attributes error
Pacu2d818c4c2bad8
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.pyindex 27baa1f5c3..ca2cc1aa88 100644--- a/saleor/dashboard/product/forms.py+++ b/saleor/dashboard/product/forms.py@@ -100,8 +100,8 @@ class ProductTypeForm(forms.ModelForm):def update_variants_names(self, data):# Some variant attributes could be removed so name should be updated# accordingly- initial_attributes = set(list(self.instance.variant_attributes.all()))- saved_attributes = set(list(data.get('variant_attributes')))+ initial_attributes = set(self.instance.variant_attributes.all())+ saved_attributes = set(data.get('variant_attributes', []))attributes_changed = initial_attributes.intersection(saved_attributes)if not attributes_changed:return