diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-02-06 17:16:23 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-02-06 17:16:23 +0100 |
commit | 8f9b00f461c5f9ddaebbe9da4cecfab18834c751 (patch) | |
tree | ee55f7187b556b98baa1b60fb96368ed9b101f1a /ishtar_common/models.py | |
parent | abed52a2598d819d75efa0a08e6aa816e0f62070 (diff) | |
download | Ishtar-8f9b00f461c5f9ddaebbe9da4cecfab18834c751.tar.bz2 Ishtar-8f9b00f461c5f9ddaebbe9da4cecfab18834c751.zip |
Harmonize CSV import and CSV exports - Imports: multi format parse of dates
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index c27f9cc29..c9903525d 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2228,7 +2228,10 @@ class FormaterType(models.Model): pass return UnicodeFormater(**kwargs) elif self.formater_type == 'DateFormater': - return DateFormater(self.options, **kwargs) + date_formats = self.options + if self.many_split: + date_formats = self.options.split(kwargs.pop('many_split')) + return DateFormater(date_formats, **kwargs) elif self.formater_type == 'StrToBoolean': return StrToBoolean(**kwargs) elif self.formater_type == 'UnknowType': |