From ae7a4010c7dbb973dbc36053deda2d502d478c91 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 22 May 2019 13:01:59 +0200 Subject: Document template: fix management of lists and dicts --- ishtar_common/models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index d4a6d4c5c..99c4c0449 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -135,11 +135,15 @@ class ValueGetter(object): val = values[key] if val is None: val = '' + elif isinstance(val, (tuple, list, dict)): + pass else: val = unicode(val) - if val.endswith('.None'): - val = '' + if val.endswith('.None'): + val = '' values[key] = val + if prefix: # do not provide KEYS and VALUES for sub-items + return values values['KEYS'] = u'\n'.join(values.keys()) value_list = [] for key in values.keys(): -- cgit v1.2.3