fnp
/
prawokultury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
359f91f
)
fix speaker form
author
Jan Szejko
<jan.szejko@gmail.com>
Tue, 19 Jul 2016 08:15:25 +0000
(10:15 +0200)
committer
Jan Szejko
<jan.szejko@gmail.com>
Tue, 19 Jul 2016 08:15:25 +0000
(10:15 +0200)
prawokultury/contact_forms.py
patch
|
blob
|
history
diff --git
a/prawokultury/contact_forms.py
b/prawokultury/contact_forms.py
index
b47bd4b
..
11dfdcc
100644
(file)
--- 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 = []
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!')))
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)
errors.append(forms.ValidationError(_('Fill at least one title!')))
if errors:
raise forms.ValidationError(errors)