refactor: better naming and move variable inside the scope
This commit is contained in:
parent
eb76248c99
commit
e4e1c4af55
1 changed files with 2 additions and 4 deletions
|
|
@ -678,9 +678,6 @@ def get_xlsx_styles(metadata: XLSXMetadata, report_name: str | None = None) -> d
|
|||
return styles
|
||||
|
||||
|
||||
NON_LABELABLE_FIELDTYPES = ("Currency", "Int", "Float", "Percent", "Date", "Datetime", "Time")
|
||||
|
||||
|
||||
def add_total_row(
|
||||
result,
|
||||
columns,
|
||||
|
|
@ -754,7 +751,8 @@ def add_total_row(
|
|||
else:
|
||||
first_col_fieldtype = columns[0].get("fieldtype")
|
||||
|
||||
if first_col_fieldtype not in NON_LABELABLE_FIELDTYPES:
|
||||
unsupported_col_types = ("Currency", "Int", "Float", "Percent", "Date", "Datetime", "Time")
|
||||
if first_col_fieldtype not in unsupported_col_types:
|
||||
total_row[0] = _("Total")
|
||||
|
||||
result.append(total_row)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue