Skip to content

Commit

Permalink
fix(ods): None values are not displayed as string
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine committed Oct 26, 2023
1 parent 0f0ddf6 commit 91e8234
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tablib/formats/_ods.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def dset_sheet(cls, dataset, ws):
for j, col in enumerate(row):
if isinstance(col, numbers.Number):
cell = table.TableCell(valuetype="float", value=col)
elif col is None:
cell = table.TableCell(value=None)

Check warning on line 70 in src/tablib/formats/_ods.py

View check run for this annotation

Codecov / codecov/patch

src/tablib/formats/_ods.py#L70

Added line #L70 was not covered by tests
else:
cell = table.TableCell(valuetype="string")
cell.addElement(text.P(text=str(col), stylename=style))
Expand Down

0 comments on commit 91e8234

Please sign in to comment.