From dd4be125f26f7bed47c7b6287ca2681108be683c Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 19 Jul 2016 10:15:25 +0200 Subject: [PATCH 1/1] fix speaker form --- prawokultury/contact_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prawokultury/contact_forms.py b/prawokultury/contact_forms.py index b47bd4b..11dfdcc 100644 --- a/prawokultury/contact_forms.py +++ b/prawokultury/contact_forms.py @@ -156,9 +156,9 @@ class RegisterSpeaker(RegistrationForm): def clean(self): cleaned_data = super(RegisterSpeaker, self).clean() errors = [] - if not cleaned_data['bio'] and not cleaned_data['bio_en']: + if not cleaned_data.get('bio') and not cleaned_data.get('bio_en'): errors.append(forms.ValidationError(_('Fill at least one bio!'))) - if not cleaned_data['presentation_title'] and not cleaned_data['presentation_title_en']: + if not cleaned_data.get('presentation_title') and not cleaned_data.get('presentation_title_en'): errors.append(forms.ValidationError(_('Fill at least one title!'))) if errors: raise forms.ValidationError(errors) -- 2.20.1