Skip to content
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

DurationField accepts integers #3359

merged 1 commit into from Sep 3, 2015


Copy link

@raphaelmerx raphaelmerx commented Sep 2, 2015


When sending an integer value for a duration field, I get a 500 because parse_duration blows up.

This PR makes DurationField accept integer values instead. I'm open to restricting DurationField to string values, but then we should return a 400 with an error message.


./ TestDurationField

@xordoquy xordoquy added the Bug label Sep 3, 2015
Copy link

tomchristie commented Sep 3, 2015

Seems sensible. Thanks!

@tomchristie tomchristie added this to the 3.2.4 Release milestone Sep 3, 2015
tomchristie added a commit that referenced this issue Sep 3, 2015
DurationField accepts integers
@tomchristie tomchristie merged commit ec007a7 into encode:master Sep 3, 2015
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants