Commit a76c3ed0 by areski

Fixed TimeField not handling empty values

parent edd9c7de
......@@ -1204,6 +1204,8 @@ class TimeField(Field):
)
if output_format.lower() == ISO_8601:
if (isinstance(value, str)):
value = datetime.datetime.strptime(value, '%H:%M:%S').time()
return value.isoformat()
return value.strftime(output_format)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment