Skip to content

Conversation

raphaelmerx
Copy link

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
@lovelydinosaur
Copy link
Member

Seems sensible. Thanks!

@lovelydinosaur lovelydinosaur added this to the 3.2.4 Release milestone Sep 3, 2015
lovelydinosaur added a commit that referenced this pull request Sep 3, 2015
DurationField accepts integers
@lovelydinosaur lovelydinosaur 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.

3 participants