From 0a9419ffefff9ba43ecb75d579deb958042f21d5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 23 Jan 2025 17:42:34 +0100 Subject: 🗃️ treatments: other_reference -> reference - find_treatments : m2m imports links - ✨ Treatment: upstream_count property - change default find external ID with upstream count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/data_importer.py | 5 ++++- 1 file changed, 4 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 7717c0e03..defea4da8 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -1315,6 +1315,9 @@ class Importer(object): if self.import_instance: self.import_instance.add_imported_line(self.idx_line) + if not obj: + return + if self.import_instance: if created: obj.imports.add(self.import_instance) @@ -2137,7 +2140,7 @@ class Importer(object): and type(new_val) == str ): updated_dct[k] = val + "\n" + new_val - else: + elif "defaults" in dct: for k in dct["defaults"]: new_val = dct["defaults"][k] if new_val is None or new_val == "": -- cgit v1.2.3