mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
make robust against None value
This commit is contained in:
parent
41e64a217c
commit
ddf88d5394
@ -218,8 +218,9 @@ class EntranceForm(ModelForm):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
if self.cleaned_data.get("url").startswith("/"):
|
if self.cleaned_data.get("url"):
|
||||||
self._errors["url"] = self.error_class(["This field cannot start with a /."])
|
if self.cleaned_data.get("url").startswith("/"):
|
||||||
|
self._errors["url"] = self.error_class(["This field cannot start with a /."])
|
||||||
return self.cleaned_data
|
return self.cleaned_data
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user