Fix columns with falsy cells wrongly parsed as dates (#276)

Eg. before this commit, this table would result in Date columns:

| A     | B |
| ----- | -- |
| FALSE | 0 |

For now, even FALSE is parsed as Numeric (not sure why we don't have
a BooleanConverter).
This commit is contained in:
Yohan Boniface
2022-09-09 21:13:34 +02:00
committed by GitHub
parent c9a81ea7ea
commit 8bc5c7d595
3 changed files with 18 additions and 1 deletions

View File

@@ -83,7 +83,7 @@ class SimpleDateTimeConverter(BaseConverter):
def convert(cls, value):
if type(value) is datetime.datetime:
return value
elif not value:
elif value is None:
return None
raise ValueError()