Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove empty label for VariantChoiceField
Marcin Gębalaba6fccc42253
diff --git a/saleor/product/forms.py b/saleor/product/forms.pyindex 927176eca8..5dc62031da 100644--- a/saleor/product/forms.py+++ b/saleor/product/forms.py@@ -40,9 +40,10 @@ class ProductForm(AddToCartForm):def __init__(self, *args, **kwargs):super(ProductForm, self).__init__(*args, **kwargs)self.fields['variant'].queryset = self.product.variants+ self.fields['variant'].empty_label = Nonedef get_variant(self, cleaned_data):- return cleaned_data.get('variant', None)+ return cleaned_data.get('variant')class ProductVariantInline(forms.models.BaseInlineFormSet):