Skip to content

Commit

Permalink
Importer | delete action needs to be in sync with others in the same …
Browse files Browse the repository at this point in the history
…group
  • Loading branch information
snyaggarwal committed Jul 21, 2022
1 parent 97c57b9 commit c25d183
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/importers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,8 @@ def make_result(self):
)

def queue_tasks(self, part_list, is_child):
chunked_lists = compact(self.chunker_list(part_list, self.parallel, is_child))
has_delete_action = not is_child and any(line.get('__action') == 'DELETE' for line in part_list)
chunked_lists = [part_list] if has_delete_action else compact(self.chunker_list(part_list, self.parallel, is_child))
jobs = group(bulk_import_parts_inline.s(_list, self.username, self.update_if_exists) for _list in chunked_lists)
group_result = jobs.apply_async(queue='concurrent')
self.groups.append(group_result)
Expand Down

0 comments on commit c25d183

Please sign in to comment.