Make the test case happy

This commit is contained in:
Mira Weller
2024-11-29 13:18:09 +01:00
parent 9acfcf2526
commit 8e3d5511e2
+1 -1
View File
@@ -1150,7 +1150,7 @@ class BaseInvoiceAddressForm(forms.ModelForm):
data['vat_id'] = ''
if self.event.settings.invoice_address_required:
if data.get('is_business') and not data.get('company'):
raise ValidationError(_('You need to provide a company name.'))
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.'))