Skip to content

Commit 77a3de7

Browse files
committed
ODSReader: Fix another number formatting .ods bug
1 parent 448bffa commit 77a3de7

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- Fix another number formatting .ods bug https://github.com/OpenDataServices/flatten-tool/pull/383
12+
913
### Changed
1014

1115
- Reduce memory footprint of flattening https://github.com/OpenDataServices/flatten-tool/pull/376

flattentool/ODSReader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def readSheet(self, sheet):
8484
"value",
8585
)
8686
)
87-
if "." in str(cell):
87+
if "." in str(value):
8888
arrCells[count] = float(value)
8989
else:
9090
arrCells[count] = int(value)

flattentool/tests/test_input_SpreadsheetInput.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ def test_xlsx_input_types(self):
196196
"colFloat": 1000.2,
197197
"colFloatComma": 1000.2,
198198
"colDate": datetime.datetime(2020, 3, 5),
199-
"colDateTime": datetime.datetime(2020, 2, 7, 16, 41, 0, 1),
199+
"colDateTime": datetime.datetime(
200+
2020, 2, 7, 16, 41, 0, 1 if sys.version_info < (3, 6) else 0
201+
),
200202
None: None,
201203
}
202204
]

0 commit comments

Comments
 (0)