From 38b9fcbf5be37b98cb1df4391b6514b31bc55070 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 2 Jun 2025 17:29:34 +0200 Subject: ✨ GIS API: GIS import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 a35a74620..545df1948 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