forked from CGM_Public/pretix_original
ContactForm: Prevent TypeError during validation
This commit is contained in:
@@ -49,7 +49,7 @@ class ContactForm(forms.Form):
|
|||||||
self.fields[key] = value
|
self.fields[key] = value
|
||||||
|
|
||||||
def clean(self):
|
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():
|
if self.cleaned_data.get('email').lower() != self.cleaned_data.get('email_repeat').lower():
|
||||||
raise ValidationError(_('Please enter the same email address twice.'))
|
raise ValidationError(_('Please enter the same email address twice.'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user