-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed TimeField not handling string times. #3809
Conversation
I think with a test case it'll be ready to merge. |
@xordoquy here the test, I could not find it when I opened the PR but after more digging I think I found it. |
@@ -1204,6 +1204,8 @@ def to_representation(self, value): | |||
) | |||
|
|||
if output_format.lower() == ISO_8601: | |||
if (isinstance(value, str)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it works ok on python 2.* with unicode
values? Seems similar to #3819
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update str
to six.string_types
? (as per #3819 indeed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will then update both DateField
& TimeField
to use six.string_types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@areski The DateTime
was out of this PR scope and now conflict with master. Could you merge it please ?
Thanks :) |
Thanks for the heads-up :) |
Fixed TimeField not handling empty values
Thanks for the work ! |
Thanks for the guidance! On Mon, Jan 11, 2016 at 12:29 PM, Xavier Ordoquy [email protected]
Kind regards, Arezqui Belaid, [email protected] Tel: +34650784355 |
Similar to #3731 but for TimeField