diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-03-07 19:21:56 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:21:00 +0100 |
commit | f1ae9d46287bdc6eeda3e7c2da6efcbacf422ef9 (patch) | |
tree | d03aa242f49bd332b0d87e1907bf38e65169995e /archaeological_operations | |
parent | 1f2b22be5f6ac94ef39d9a6957b2f452b81c92ea (diff) | |
download | Ishtar-f1ae9d46287bdc6eeda3e7c2da6efcbacf422ef9.tar.bz2 Ishtar-f1ae9d46287bdc6eeda3e7c2da6efcbacf422ef9.zip |
Operation - Parcels - Modify: do not check for identical on deleted forms
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/forms.py | 3 | ||||
-rw-r--r-- | archaeological_operations/views.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 4034b94cd..caa19a1fb 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -363,7 +363,8 @@ class ParcelFormSet(FormSet): self.management_form.is_valid() # Checks that no parcels are duplicated. self.check_duplicate(('town', 'section', 'parcel_number', - 'year'), _("There are identical parcels.")) + 'year'), _("There are identical parcels."), + exclude_deleted=True) if hasattr(self, 'cleaned_data') and self.cleaned_data: return self.cleaned_data diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 6208e7265..23419ba14 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -444,7 +444,7 @@ def operation_modify_parcels(request, pk): if request.method == 'POST': new_data = dict(request.POST) - new_data = {k: new_data[k][0] for k in new_data} # convert POST to classic dict + new_data = {k: new_data[k][0] for k in new_data} # convert POST to classic dict new_data.update(data) formset = formset_class(new_data) parcel_selection = new_data.get('_parcel_selection', None) |