diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-05-22 13:01:59 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-05-22 13:01:59 +0200 | 
| commit | ae7a4010c7dbb973dbc36053deda2d502d478c91 (patch) | |
| tree | 3f06f581c2a7a26a8bd83472b9b9d84e79b9e46b | |
| parent | 9f577da421b5b909fea2caff3049aea1cd7acf30 (diff) | |
| download | Ishtar-ae7a4010c7dbb973dbc36053deda2d502d478c91.tar.bz2 Ishtar-ae7a4010c7dbb973dbc36053deda2d502d478c91.zip  | |
Document template: fix management of lists and dicts
| -rw-r--r-- | ishtar_common/models.py | 8 | 
1 files changed, 6 insertions, 2 deletions
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():  | 
