diff options
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r-- | archaeological_operations/forms.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 18a83f033..4034b94cd 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -116,12 +116,14 @@ class ParcelForm(IshtarForm): return if not self.cleaned_data or (DELETION_FIELD_NAME in self.cleaned_data and self.cleaned_data[DELETION_FIELD_NAME]): - print("Youpitralala") return if (not self.cleaned_data.get('parcel_number') or not self.cleaned_data.get('section')) and \ not self.cleaned_data.get('public_domain'): - return {} + # empty line reinit cleaned data + self.cleaned_data["year"] = None + self.cleaned_data["town"] = None + return self.cleaned_data if not self.cleaned_data.get('town'): raise forms.ValidationError(_("Town section is required.")) return self.cleaned_data |