summaryrefslogtreecommitdiff
path: root/ishtar_common/data_importer.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-08 17:06:51 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:20 +0100
commitc8de10fe7262c28655132be7a41114fc3e200be0 (patch)
tree6bbabcb11171f6c484f824e4a811e23072c7fcd9 /ishtar_common/data_importer.py
parent66c25ade1b4b79e0179a1b8e92ceee51492c33cf (diff)
downloadIshtar-c8de10fe7262c28655132be7a41114fc3e200be0.tar.bz2
Ishtar-c8de10fe7262c28655132be7a41114fc3e200be0.zip
Import value formater: can use {item} notation for format
Diffstat (limited to 'ishtar_common/data_importer.py')
-rw-r--r--ishtar_common/data_importer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index 8d99889fc..d63004849 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -1665,7 +1665,10 @@ class Importer(object):
c_values.append("")
return
if formater.value_format and value is not None and value != "":
- value = formater.value_format.format(value)
+ if "{item" in formater.value_format:
+ value = formater.value_format.format(item=value)
+ else:
+ value = formater.value_format.format(value)
if hasattr(value, "close"):
# opened file are kept - they need to be listed and closed
# later