diff --git a/src/program/forms.py b/src/program/forms.py index e13d28be..e5d8af16 100644 --- a/src/program/forms.py +++ b/src/program/forms.py @@ -29,7 +29,7 @@ class BaseEventProposalForm(forms.ModelForm): def clean_duration(self): duration = self.cleaned_data['duration'] - if duration < 60 or duration > 180: + if not duration or duration < 60 or duration > 180: raise forms.ValidationError("Please keep duration between 60 and 180 minutes.") return duration