summaryrefslogtreecommitdiff
path: root/ishtar_common/data_importer.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/data_importer.py')
-rw-r--r--ishtar_common/data_importer.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index 941ccc4af..2210de499 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -174,13 +174,16 @@ class ImporterError(Exception):
return str(self.msg)
-class Formater(object):
+class Formater:
def __init__(self, *args, **kwargs):
self.db_target = kwargs.get("db_target", None)
def format(self, value):
return value
+ def __str__(self):
+ return self.__class__.__name__
+
def check(
self,
values,
@@ -290,6 +293,9 @@ class UnicodeFormater(Formater):
value = self.prefix + value
return value
+ def __str__(self):
+ return f"{self.__class__.__name__}|{self.max_length or 0}"
+
class BooleanFormater(Formater):
def format(self, value):