mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Fix all-optional in address-form for resellers (#4672)
This commit is contained in:
committed by
GitHub
parent
61cb2e15cf
commit
d1989c3cd3
@@ -1154,7 +1154,7 @@ class BaseInvoiceAddressForm(forms.ModelForm):
|
||||
raise ValidationError({"company": _('You need to provide a company name.')})
|
||||
if not data.get('is_business') and not data.get('name_parts'):
|
||||
raise ValidationError(_('You need to provide your name.'))
|
||||
if 'street' in self.fields and not data.get('street') and not data.get('zipcode') and not data.get('city'):
|
||||
if not self.all_optional and 'street' in self.fields and not data.get('street') and not data.get('zipcode') and not data.get('city'):
|
||||
raise ValidationError({"street": _('This field is required.')})
|
||||
|
||||
if 'vat_id' in self.changed_data or not data.get('vat_id'):
|
||||
|
||||
Reference in New Issue
Block a user