summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/forms.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/forms.py b/core/forms.py
index b27a8a8..af3b171 100644
--- a/core/forms.py
+++ b/core/forms.py
@@ -119,10 +119,10 @@ class CaveForm(ModelForm):
)
# 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."])
- if cleaned_data.get("url") == []:
- self._errors["url"] = self.error_class(["This field is required."])
- if cleaned_data.get("url") and cleaned_data.get("url").startswith("/"):
- self._errors["url"] = self.error_class(["This field cannot start with a /."])
+ # if cleaned_data.get("url") == []:
+ # self._errors["url"] = self.error_class(["This field is required."])
+ # if cleaned_data.get("url") and cleaned_data.get("url").startswith("/"):
+ # self._errors["url"] = self.error_class(["This field cannot start with a /."])
return cleaned_data
@@ -218,9 +218,9 @@ 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 /."])
+ # 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("/"):
+ # self._errors["url"] = self.error_class(["This field cannot start with a /."])
return self.cleaned_data