summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-02-07 11:29:57 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:21:00 +0100
commit641830616108b3f6e7210600a3b0a0f9f1a227a9 (patch)
treef4b6674a743ce1b66dc93284f1521a7fcae8fa68 /archaeological_operations/forms.py
parent1ddb738376757581fc8ae4bb8207656953176a92 (diff)
downloadIshtar-641830616108b3f6e7210600a3b0a0f9f1a227a9.tar.bz2
Ishtar-641830616108b3f6e7210600a3b0a0f9f1a227a9.zip
Operation - Parcels - Modify: fix parcel deletion
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py6
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