diff options
author | fabrixxm <fabrixxm@kirgroup.net> | 2021-08-09 12:14:51 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-08-09 16:09:07 +0200 |
commit | daf1ea6d01bf39318429331b86eabf6a4cfcc739 (patch) | |
tree | d06848615a44e734033f68a79400e3bcbaa6692c | |
parent | 34f42419c536f26a48dea788ebf8fb483a3fdb3e (diff) |
Force LesadaDate.load() return `datetime.date` when parsing
-rw-r--r-- | lesana/types.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lesana/types.py b/lesana/types.py index 6e5d21d..677fbdf 100644 --- a/lesana/types.py +++ b/lesana/types.py @@ -278,7 +278,7 @@ class LesanaDate(LesanaType): # compatibility with dateutil before 2.8 ParserError = getattr(dateutil.parser, 'ParserError', ValueError) try: - return dateutil.parser.parse(data) + return dateutil.parser.parse(data).date() except ParserError: raise LesanaValueError( "Invalid value for date field: {}".format(data) |