From 20a8009562b4d03b334469fbe2902386be3371f4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 18 Oct 2023 12:48:05 +0200 Subject: 🐛 Custom forms: fix crash when removing fields already filtered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_context_records/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index e22bb73cc..24a94f2f5 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -403,7 +403,7 @@ class RecordFormGeneral(CustomForm, ManageOldType): self.fields["parcel"].required = False self.fields["town"].choices = [("", "--")] else: - self.fields.pop("town") + self._remove_fields(("town",)) site_label = IshtarSiteProfile.get_default_site_label() self.fields["archaeological_site"].label = site_label -- cgit v1.2.3