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,6 +218,7 @@ class EntranceForm(ModelForm):
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user