summaryrefslogtreecommitdiff
path: root/ishtar_common/data_importer.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/data_importer.py')
-rw-r--r--ishtar_common/data_importer.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index 90cabf0b1..b4be3d297 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -741,6 +741,7 @@ class Importer(object):
MAIN_GEO = False
LINE_FORMAT = []
OBJECT_CLS = None
+ DEBUG = False
UNICITY_KEYS = []
# if set only models inside this list can be created
MODEL_CREATION_LIMIT = []
@@ -835,6 +836,7 @@ class Importer(object):
self._pre_import_values = self.PRE_IMPORT_VALUES.copy()
self.history_modifier = history_modifier
self.output = output
+ self.debug = []
if not self.history_modifier:
if self.import_instance and self.import_instance.user:
self.history_modifier = self.import_instance.user.user_ptr
@@ -1189,6 +1191,10 @@ class Importer(object):
continue
data = update_data(defaults, data)
self.validity.append(c_row)
+ if self.DEBUG:
+ debug_data = copy.deepcopy(data)
+ debug_data["_debug_current_line"] = idx_line + 1
+ self.debug.append(debug_data)
if not self.c_errors and (idx_col + 1) < self.min_col_number:
self.c_errors = True
self.errors.append(