From 35eaa21a193e548be2e7478f1cf52b584dbe75d2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 2 Jun 2025 17:29:34 +0200 Subject: WIP GIS import --- ishtar_common/data_importer.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ishtar_common/data_importer.py') 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): -- cgit v1.2.3