From 3e9cfaeaed2eced1e3f9b2bd80f2f93b730d06e9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 13 Sep 2023 12:59:20 +0200 Subject: ✨ Pre-import form: form choice field - black format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 97a479505..98152f189 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1157,7 +1157,8 @@ class ArchaeologicalSiteForm(ManageOldType): def save(self, user): dct = self.cleaned_data dct['history_modifier'] = user - for typ in self.TYPES: + type_lst = self._types or self.TYPES + for typ in type_lst: if not dct[typ.key]: dct[typ.key] = None if typ.is_multiple: -- cgit v1.2.3