mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
ContactForm: Prevent TypeError during validation
This commit is contained in:
@@ -49,7 +49,7 @@ class ContactForm(forms.Form):
|
||||
self.fields[key] = value
|
||||
|
||||
def clean(self):
|
||||
if self.event.settings.order_email_asked_twice:
|
||||
if self.event.settings.order_email_asked_twice and self.cleaned_data.get('email') and self.cleaned_data.get('email_repeat'):
|
||||
if self.cleaned_data.get('email').lower() != self.cleaned_data.get('email_repeat').lower():
|
||||
raise ValidationError(_('Please enter the same email address twice.'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user