From d1989c3cd3651113752aea192eecbba159b5dcff Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Mon, 2 Dec 2024 09:46:33 +0100 Subject: [PATCH] Fix all-optional in address-form for resellers (#4672) --- src/pretix/base/forms/questions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/base/forms/questions.py b/src/pretix/base/forms/questions.py index dea30d675f..711159b14d 100644 --- a/src/pretix/base/forms/questions.py +++ b/src/pretix/base/forms/questions.py @@ -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'):