diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/data_importer.py | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py index d58c9019e..63a8d65cf 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -1057,12 +1057,12 @@ class Importer(object):      def post_import(self):          related_list = {} -        if self.import_instance: +        if self.import_instance and not self.line_to_process:              self.import_instance.state = "PP"              self.import_instance.imported_line_numbers = ""              self.import_instance.save()          for cls_pk, idx_line in self.post_save_items.items(): -            if self.import_instance: +            if self.import_instance and not self.line_to_process:                  self.import_instance.add_imported_line(idx_line)              cls, pk = cls_pk              # force django based post-processing for the item @@ -1147,7 +1147,8 @@ class Importer(object):                  table, self.output, choose_default=choose_default, user=user              )          self.simulate = simulate -        return self._importation(table, line_to_process=line_to_process) +        self.line_to_process = line_to_process +        return self._importation(table)      def get_current_values(self, obj):          return obj @@ -1235,7 +1236,7 @@ class Importer(object):                  current_data = current_data[key]          return data -    def _importation(self, table, line_to_process=None): +    def _importation(self, table):          self.match_table = {}          table = list(table)          if not table or not table[0]: @@ -1274,10 +1275,10 @@ class Importer(object):          results = []          for idx_line, line in enumerate(table):              self.idx_line = idx_line -            if line_to_process is not None: -                if line_to_process != idx_line: +            if self.line_to_process is not None: +                if self.line_to_process != idx_line:                      continue -                if idx_line > line_to_process: +                if idx_line > self.line_to_process:                      return results              if self.output == "cli":                  left = None | 
