fix: don't parse non-valid dates

This commit is contained in:
ziirish 2021-09-17 13:05:14 +02:00
parent 2e77865bd9
commit 705c86ec0d
No known key found for this signature in database
GPG key ID: 72DB229A64B54E46

View file

@ -37,7 +37,7 @@ class DateTime(fields.DateTime):
a = arrow.get(value)
a = a.to(TZ)
except arrow.parser.ParserError:
return value
return None
return fields.DateTime.parse(self, a.datetime)
def format(self, value):