Skip to content

Commit cc54f6a

Browse files
committed
Importers | Added deleted count and details in results
1 parent 5fdc09e commit cc54f6a

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

core/importers/models.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def process(self):
524524

525525

526526
class BulkImportInline(BaseImporter):
527-
def __init__( # pylint: disable=too-many-arguments
527+
def __init__( # pylint: disable=too-many-arguments
528528
self, content, username, update_if_exists=False, input_list=None, user=None, set_user=True,
529529
self_task_id=None
530530
):
@@ -826,10 +826,12 @@ def update_elapsed_seconds(self):
826826
@property
827827
def detailed_summary(self):
828828
result = self.json_result
829-
return "Started: {} | Processed: {}/{} | Created: {} | Updated: {} | Existing: {} | Time: {}secs".format(
830-
self.start_time_formatted, result.get('processed'), result.get('total'),
831-
len(result.get('created')), len(result.get('updated')), len(result.get('exists')), self.elapsed_seconds
832-
)
829+
return "Started: {} | Processed: {}/{} | Created: {} | Updated: {} | Deleted: {} | " \
830+
"Existing: {} | Time: {}secs".format(
831+
self.start_time_formatted, result.get('processed'), result.get('total'),
832+
len(result.get('created')), len(result.get('updated')), len(result.get('deleted')),
833+
len(result.get('exists')), self.elapsed_seconds
834+
)
833835

834836
@property
835837
def start_time_formatted(self):
@@ -842,7 +844,7 @@ def json_result(self):
842844

843845
total_result = dict(
844846
total=0, processed=0, created=[], updated=[],
845-
invalid=[], exists=[], failed=[], exception=[],
847+
invalid=[], exists=[], failed=[], exception=[], deleted=[],
846848
others=[], unknown=[], elapsed_seconds=self.elapsed_seconds
847849
)
848850
for task in self.tasks:

0 commit comments

Comments
 (0)