diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-04-20 16:28:21 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-04-20 16:28:21 +0200 |
commit | 0ff92ef98dbfbfc0e2d89dff18f7bb2dc3950b8c (patch) | |
tree | dea08fc84ca5ef9d4bcbaae8e2629e73573eab6d /ishtar_common/wizards.py | |
parent | a589b3ef96c9adf4e408713201ffe7d269e4f78f (diff) | |
download | Ishtar-0ff92ef98dbfbfc0e2d89dff18f7bb2dc3950b8c.tar.bz2 Ishtar-0ff92ef98dbfbfc0e2d89dff18f7bb2dc3950b8c.zip |
precise_town refactoring for django app consistency
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 8dcb16b70..13ea27720 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -440,11 +440,11 @@ class Wizard(IshtarWizard): for form in forms: is_formset = hasattr(form, "forms") base_form = is_formset and form.forms[0] or form - associated_models = ( - hasattr(base_form, "associated_models") - and base_form.associated_models - or {} - ) + associated_models = {} + if hasattr(base_form, "format_models"): + associated_models = base_form.format_models + if hasattr(base_form, "associated_models"): + associated_models.update(base_form.associated_models) if not hasattr(form, "cleaned_data") and hasattr(form, "forms"): cleaned_datas = [ frm.cleaned_data for frm in form.forms if frm.is_valid() |