diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/forms.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/forms.py b/core/forms.py index 0d03d19..b27a8a8 100644 --- a/core/forms.py +++ b/core/forms.py @@ -218,8 +218,9 @@ class EntranceForm(ModelForm): ) def clean(self): - if self.cleaned_data.get("url").startswith("/"): - self._errors["url"] = self.error_class(["This field cannot start with a /."]) + if self.cleaned_data.get("url"): + if self.cleaned_data.get("url").startswith("/"): + self._errors["url"] = self.error_class(["This field cannot start with a /."]) return self.cleaned_data |