~valhalla/lesana-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH] Force LesadaDate.load() return `datetime.date` when parsing

Details
Message ID
<20210809101451.154211-1-fabrixxm@kirgroup.net>
DKIM signature
pass
Download raw message
Patch: +1 -1
---
 lesana/types.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
2.32.0
Reply to thread Export thread (mbox)