Skip to content

Commit

Permalink
Merge 4da65fc into ba3e77f
Browse files Browse the repository at this point in the history
  • Loading branch information
Iván Todorovich committed Sep 6, 2019
2 parents ba3e77f + 4da65fc commit 503692a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions report_xlsx_helper/report/report_xlsx_abstract.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2009-2018 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from datetime import datetime
from datetime import date, datetime
import re
from types import CodeType
from xlsxwriter.utility import xl_rowcol_to_cell
Expand Down Expand Up @@ -501,7 +501,7 @@ def _write_line(self, ws, row_pos, ws_params, col_specs_section=None,
cell_type = 'string'
elif isinstance(cell_value, (int, float)):
cell_type = 'number'
elif isinstance(cell_value, datetime):
elif isinstance(cell_value, (date, datetime)):
cell_type = 'datetime'
else:
if not cell_value:
Expand All @@ -513,7 +513,7 @@ def _write_line(self, ws, row_pos, ws_params, col_specs_section=None,
"col_specs_section %s, column %s"
) % (__name__, col_specs_section, col)
if cell_value:
msg += _(", cellvalue %s")
msg += _(", cellvalue %s") % cell_value
raise UserError(msg)
colspan = cell_spec.get('colspan') or colspan
args_pos = [row_pos, pos]
Expand Down

0 comments on commit 503692a

Please sign in to comment.