mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
url code commented out
This commit is contained in:
parent
ddf88d5394
commit
d333ebe88e
@ -119,10 +119,10 @@ class CaveForm(ModelForm):
|
|||||||
)
|
)
|
||||||
# if self.cleaned_data.get("kataster_number") != "" and self.cleaned_data.get("official_name") == "":
|
# if self.cleaned_data.get("kataster_number") != "" and self.cleaned_data.get("official_name") == "":
|
||||||
# self._errors["official_name"] = self.error_class(["This field is required when there is a kataster number."])
|
# self._errors["official_name"] = self.error_class(["This field is required when there is a kataster number."])
|
||||||
if cleaned_data.get("url") == []:
|
# if cleaned_data.get("url") == []:
|
||||||
self._errors["url"] = self.error_class(["This field is required."])
|
# self._errors["url"] = self.error_class(["This field is required."])
|
||||||
if cleaned_data.get("url") and cleaned_data.get("url").startswith("/"):
|
# if cleaned_data.get("url") and cleaned_data.get("url").startswith("/"):
|
||||||
self._errors["url"] = self.error_class(["This field cannot start with a /."])
|
# self._errors["url"] = self.error_class(["This field cannot start with a /."])
|
||||||
return cleaned_data
|
return cleaned_data
|
||||||
|
|
||||||
|
|
||||||
@ -218,9 +218,9 @@ class EntranceForm(ModelForm):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
if self.cleaned_data.get("url"):
|
# if self.cleaned_data.get("url"): # can remove this as the form does not have a url field any more, which was never used anyway
|
||||||
if self.cleaned_data.get("url").startswith("/"):
|
# if self.cleaned_data.get("url").startswith("/"):
|
||||||
self._errors["url"] = self.error_class(["This field cannot start with a /."])
|
# 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