forked from CGM_Public/pretix_original
Order import: Allow custom country codes (like XK)
This commit is contained in:
@@ -392,7 +392,7 @@ class InvoiceAddressCountry(ImportColumn):
|
|||||||
return list(countries)
|
return list(countries)
|
||||||
|
|
||||||
def clean(self, value, previous_values):
|
def clean(self, value, previous_values):
|
||||||
if value and not Country(value).numeric:
|
if value and not (Country(value).numeric or value in settings.COUNTRIES_OVERRIDE):
|
||||||
raise ValidationError(_("Please enter a valid country code."))
|
raise ValidationError(_("Please enter a valid country code."))
|
||||||
return value
|
return value
|
||||||
|
|
||||||
@@ -538,7 +538,7 @@ class AttendeeCountry(ImportColumn):
|
|||||||
return list(countries)
|
return list(countries)
|
||||||
|
|
||||||
def clean(self, value, previous_values):
|
def clean(self, value, previous_values):
|
||||||
if value and not Country(value).numeric:
|
if value and not (Country(value).numeric or value in settings.COUNTRIES_OVERRIDE):
|
||||||
raise ValidationError(_("Please enter a valid country code."))
|
raise ValidationError(_("Please enter a valid country code."))
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user