mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
committed by
Raphael Michel
parent
6e4750336b
commit
a2acd336eb
@@ -216,6 +216,8 @@ class BaseInvoiceAddressForm(forms.ModelForm):
|
||||
|
||||
def clean(self):
|
||||
data = self.cleaned_data
|
||||
if not data.get('is_business'):
|
||||
data['company'] = ''
|
||||
if not data.get('name') and not data.get('company') and self.event.settings.invoice_address_required:
|
||||
raise ValidationError(_('You need to provide either a company name or your name.'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user