summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/data_importer.py5
-rw-r--r--ishtar_common/models_imports.py3
2 files changed, 6 insertions, 2 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
diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py
index 46d92c994..b61d591b1 100644
--- a/ishtar_common/models_imports.py
+++ b/ishtar_common/models_imports.py
@@ -672,7 +672,8 @@ class ValueFormater(models.Model):
"A string used to format a value using the Python "
'"format()" method. The site https://pyformat.info/ '
'provide good examples of usage. Only one "{}" entry '
- "is managed. The input is assumed to be a string."
+ 'is managed. Instead you can use "{item}". The input is '
+ 'assumed to be a string.'
),
)
objects = SlugModelManager()