Commit b5b6c7bd authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

notify when virus is empty

parent ac71da91
......@@ -163,7 +163,7 @@ class MessageImportationObserver(ImportationObserver):
virus=str(virus),
row_id=str(row_id),
)
if reason:
if reason or reason_id:
msg = self.reason_to_str(msg, reason, reason_id)
self.add_message(
self.request,
......@@ -402,6 +402,12 @@ def __parse_file(file, importation_observer: ImportationObserver = None, sheet_n
row_id=row_id,
col_id=id_col + start_at,
)
elif id_col > 0 and importation_observer:
importation_observer.notify_virus_error(
sub_row[0],
row_id,
reason_id=ImportationObserver.EMPTY_NAME,
)
if input_file is not None:
input_file.close()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment