add more helpful message

pull/1931/head
dgtlmoon 1 year ago
parent 160901a32c
commit 6c44973cfd

@ -158,6 +158,7 @@ class import_xlsx_wachete(Importer):
# @todo correct except # @todo correct except
flash("Unable to read export XLSX file, something wrong with the file?", 'error') flash("Unable to read export XLSX file, something wrong with the file?", 'error')
return return
row_id = 2 row_id = 2
for row in wb.active.iter_rows(min_row=row_id): for row in wb.active.iter_rows(min_row=row_id):
try: try:
@ -206,7 +207,7 @@ class import_xlsx_wachete(Importer):
good += 1 good += 1
except Exception as e: except Exception as e:
print(e) print(e)
flash(f"Error processing row number {row_id}, check all cell data types are correct") flash(f"Error processing row number {row_id}, check all cell data types are correct, row was skipped.", 'error')
else: else:
row_id += 1 row_id += 1
@ -236,10 +237,10 @@ class import_xlsx_custom(Importer):
return return
# @todo cehck atleast 2 rows, same in other method # @todo cehck atleast 2 rows, same in other method
from .forms import validate_url from .forms import validate_url
row_i = 1
try: try:
row_i = 1
for row in wb.active.iter_rows(): for row in wb.active.iter_rows():
url = None url = None
tags = None tags = None
@ -289,7 +290,7 @@ class import_xlsx_custom(Importer):
good += 1 good += 1
except Exception as e: except Exception as e:
print(e) print(e)
flash(f"Error processing row number {row_i}, check all cell data types are correct") flash(f"Error processing row number {row_i}, check all cell data types are correct, row was skipped.", 'error')
else: else:
row_i += 1 row_i += 1

Loading…
Cancel
Save