diff options
-rw-r--r-- | core/forms.py | 4 | ||||
-rw-r--r-- | parsers/people.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/forms.py b/core/forms.py index 0bcd6ef..b9a8c1f 100644 --- a/core/forms.py +++ b/core/forms.py @@ -149,6 +149,10 @@ class CaveForm(ModelForm): # 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 self.data.get("areacode") == "": + self._errors["areacode"] = self.error_class( + ["An areacode, e.g. 1623, is required."] + ) return cleaned_data diff --git a/parsers/people.py b/parsers/people.py index 0a05efb..5426683 100644 --- a/parsers/people.py +++ b/parsers/people.py @@ -188,7 +188,7 @@ def check_new_signups(expedition): signups_clear = read_signups() # print(signups_clear) for slug in signups_clear: - print(slug) + print(f"check_new_signups: {slug}") p = Person.objects.get(slug=slug) pe = PersonExpedition.objects.update_or_create(person=p, expedition=expedition) # print("ADDING ",pe, expedition) |