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 | 7cc2fb3e699db7cac0b9b66f1a36332f5cf210d7 (patch) | |
| tree | d03aa242f49bd332b0d87e1907bf38e65169995e /archaeological_operations | |
| parent | 7fcd7036b0a00c87527ee2c4869921bc9ab7ba2d (diff) | |
| download | Ishtar-7cc2fb3e699db7cac0b9b66f1a36332f5cf210d7.tar.bz2 Ishtar-7cc2fb3e699db7cac0b9b66f1a36332f5cf210d7.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) |
