Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Make ProductClassForm compatible with python3
Adam Bogdałbb44c9f93a29
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.pyindex 97618153a9..7b6ea4023d 100644--- a/saleor/dashboard/product/forms.py+++ b/saleor/dashboard/product/forms.py@@ -20,7 +20,8 @@ class ProductClassForm(forms.Form):def __init__(self, *args, **kwargs):super(ProductClassForm, self).__init__(*args, **kwargs)- self.fields['product_cls'].initial = PRODUCT_CLASSES.keys()[0].__name__+ product_classes = list(PRODUCT_CLASSES.keys())+ self.fields['product_cls'].initial = product_classes[0].__name__class StockForm(forms.ModelForm):