Null value for datetimes
@@ -16,7 +16,7 @@ def iso8601_date(s):
"""
try:
return datetime.datetime.strptime(s, ISO8601_DATE_FORMAT).replace(tzinfo=pytz.utc).date()
- except ValueError:
+ except (TypeError, ValueError):
return s
@@ -29,7 +29,7 @@ def iso8601_datetime(s):
"""
try:
return datetime.datetime.strptime(s, ISO8601_DATETIME_FORMAT).replace(tzinfo=pytz.utc)
- except ValueError:
+ except (TypeError, ValueError):
return s
