aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfabrixxm <fabrixxm@kirgroup.net>2021-08-09 12:14:51 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2021-08-09 16:09:07 +0200
commitdaf1ea6d01bf39318429331b86eabf6a4cfcc739 (patch)
treed06848615a44e734033f68a79400e3bcbaa6692c
parent34f42419c536f26a48dea788ebf8fb483a3fdb3e (diff)
Force LesadaDate.load() return `datetime.date` when parsing
-rw-r--r--lesana/types.py2
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)