From f1ae9d46287bdc6eeda3e7c2da6efcbacf422ef9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 7 Mar 2022 19:21:56 +0100 Subject: Operation - Parcels - Modify: do not check for identical on deleted forms --- archaeological_operations/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archaeological_operations/forms.py') 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 -- cgit v1.2.3