From cfcba45d0afaba5854d23bdaf067e9cf47cdf99d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 26 Aug 2019 16:56:33 +0200 Subject: Import: regression - M2M do not import with no value (defaults is not a value) --- ishtar_common/data_importer.py | 3 ++- 1 file changed, 2 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 2680cb05b..b0e01d70d 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -1490,7 +1490,8 @@ class Importer(object): if attribute not in new_created: new_created[attribute] = [] new_created[attribute].append(key) - has_values = bool([1 for k in v if v[k]]) + has_values = bool([1 for k in v + if v[k] and k != "defaults"]) if has_values: if self.MODEL_CREATION_LIMIT and \ model not in self.MODEL_CREATION_LIMIT: -- cgit v1.2.3