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
merged 1 commit into from Sep 3, 2015
Merged

Conversation

raphaelmerx
Copy link
Contributor

Description

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.

Test

./runtests.py TestDurationField

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

Seems sensible. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants