diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-26 14:39:13 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-26 14:39:13 +0200 |
commit | eb1585c1ea526d2f0979d6a91b33ed1023f4d8e0 (patch) | |
tree | 8b9cef16c3dc1077b81465029b102391fa6106fa /ishtar_common/data_importer.py | |
parent | 073e8c59195863fcd70ca0723fd110fc2f908758 (diff) | |
parent | cdec41e1a2af5fc2a3ab9ca8d3d4ad6fcab848c3 (diff) | |
download | Ishtar-eb1585c1ea526d2f0979d6a91b33ed1023f4d8e0.tar.bz2 Ishtar-eb1585c1ea526d2f0979d6a91b33ed1023f4d8e0.zip |
Merge branch 'master' into develop
Diffstat (limited to 'ishtar_common/data_importer.py')
-rw-r--r-- | ishtar_common/data_importer.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py index 76b186038..4ac90f074 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -1415,8 +1415,7 @@ class Importer(object): if attribute != '__force_new': self.get_field(cls, attribute, data, m2ms, c_c_path, new_created) - except (ValueError, IntegrityError) as e: - message = e.message + except (ValueError, IntegrityError, FieldDoesNotExist) as e: try: message = e.message.decode('utf-8') except (UnicodeDecodeError, UnicodeDecodeError): @@ -1538,6 +1537,9 @@ class Importer(object): if m2ms: # force post save script obj.save() + if hasattr(obj, 'fix'): + # post save/m2m specific fix + obj.fix() except IntegrityError as e: message = e.message try: |