summaryrefslogtreecommitdiff
path: root/ishtar_common/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-03 21:50:47 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-16 17:04:41 +0100
commit3e4a009c4be2d85d4443d59706ddf4ee9671b204 (patch)
treef9c6779750004098917b04b1c4837971b649be3e /ishtar_common/wizards.py
parent09ffeeb464e53eb37a005c92c0af54af25a59561 (diff)
downloadIshtar-3e4a009c4be2d85d4443d59706ddf4ee9671b204.tar.bz2
Ishtar-3e4a009c4be2d85d4443d59706ddf4ee9671b204.zip
JSON types: multi valued choices - fix search index and last panel
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r--ishtar_common/wizards.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 2b0a47a72..47839b58e 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -463,7 +463,6 @@ class Wizard(IshtarWizard):
else:
value = _("No")
elif key in associated_models:
- values = []
if type(value) in (tuple, list):
values = value
elif "," in str(value):
@@ -479,6 +478,12 @@ class Wizard(IshtarWizard):
value = str(item)
rendered_values.append(value)
value = " ; ".join(rendered_values)
+ if key.startswith("data__"):
+ if isinstance(value, list):
+ value = ", ".join(value)
+ if value.startswith("[") and value.endswith("]"):
+ value = " ; ".join(
+ [v.strip()[1:-1] for v in value[1:-1].split(",")])
current_form_data.append((lbl, value, ""))
if is_formset: