[IMP] sql_export_excel: pylint

This commit is contained in:
Maksym Yankin
2022-01-31 16:01:30 +02:00
committed by Florian da Costa
parent a66df4026f
commit a09944e90f
2 changed files with 19 additions and 22 deletions

View File

@@ -93,13 +93,13 @@ class SqlExport(models.Model):
sheets = wb.worksheets
try:
ws = sheets[self.sheet_position - 1]
except IndexError:
except IndexError as err:
raise exceptions.ValidationError(
_(
"The Excel Template file contains less than %s sheets "
"Please, adjust the Sheet Position parameter."
)
)
) from err
row_position = self.row_position or 1
col_position = self.col_position or 1
# Case of excel file creation