From 87afa869477c69bbb3c36083fea076e47d565d4c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 19 Oct 2015 18:03:52 +0200 Subject: Imports: create fake importer on database for specific importers --- ishtar_common/models.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 51cf1096f..09ce9aba5 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1457,6 +1457,7 @@ IMPORTER_TYPES = ( ('YearFormater', _(u"Year")), ('StrToBoolean', _(u"String to boolean")), ('FileFormater', pgettext_lazy("filesystem", u"File")), + ('UnknowType', _(u"Unknow type")) ) IMPORTER_TYPES_DCT = { @@ -1531,6 +1532,8 @@ class FormaterType(models.Model): return DateFormater(self.options, **kwargs) elif self.formater_type == 'StrToBoolean': return StrToBoolean(**kwargs) + elif self.formater_type == 'UnknowType': + return else: return IMPORTER_TYPES_DCT[self.formater_type](**kwargs) -- cgit v1.2.3