Skip to content

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

Define field as not required so that it accepts empty value as valid

Mira Szewczyk8811363ee10f
diff --git a/saleor/cart/forms.py b/saleor/cart/forms.py
index 8651c7c89f..be52ac2b1b 100644
--- a/saleor/cart/forms.py
+++ b/saleor/cart/forms.py
@@ -118,8 +118,8 @@ class ReplaceCartLineForm(AddToCartForm):
class CountryForm(forms.Form):
- country = forms.ChoiceField(
- choices=COUNTRY_CODE_CHOICES, label='')
+ country = forms.ChoiceField(choices=COUNTRY_CODE_CHOICES, label='',
+ required=False)
def get_shipment_options(self):
code = self.cleaned_data['country']