From d070928fe72e79f816f13a1d6dea4855114641e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr>
Date: Tue, 6 Oct 2020 21:03:43 +0200
Subject: [PATCH] make document root available in XMLImportTask

---
 django_diu/import_command.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/django_diu/import_command.py b/django_diu/import_command.py
index 81d9a28..42940e4 100644
--- a/django_diu/import_command.py
+++ b/django_diu/import_command.py
@@ -169,8 +169,8 @@ class XMLImportTask(ImportTask):
 
     def open_data_source(self):
         tree = ET.parse(self.xmlFile)
-        root = tree.getroot()
-        self.rows = root.findall(self.xpathSelector)
+        self.root = tree.getroot()
+        self.rows = self.root.findall(self.xpathSelector)
 
     def count_source(self):
         self.source_count = len(self.rows)
-- 
GitLab