diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-03-26 11:04:50 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:41:37 +0200 |
commit | b7dceba5b920d99d2c4af67ed5485121c5aa83d5 (patch) | |
tree | fc69d464c68714b9d9e0d35cfa5c2228b79f4f7b | |
parent | a494906658d7202f3d18c8839f3e4bda16b77834 (diff) | |
download | Ishtar-b7dceba5b920d99d2c4af67ed5485121c5aa83d5.tar.bz2 Ishtar-b7dceba5b920d99d2c4af67ed5485121c5aa83d5.zip |
Step by step import: fix JSON data update check
-rw-r--r-- | ishtar_common/data_importer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py index 4eb403c44..67aa402b8 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -1721,6 +1721,7 @@ class Importer(object): else: dct.pop(k) + obj = None if self.simulate: q = cls.objects.filter(**dct) if not q.count(): @@ -1780,7 +1781,7 @@ class Importer(object): new_val = dct['defaults'][k] if new_val is None or new_val == '': continue - if k == 'data': + if obj and k == 'data': updated_dct[k] = update_data(obj.data, new_val) else: |