Skip to content

Made TemplateHTMLRenderer render IntegerField inputs when value is 0. #5834

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Feb 16, 2018

Conversation

carltongibson
Copy link
Collaborator

Fixes #5767. Updates & Closes #5768.

  • Adjusts templates to allow integer field 0 values. Thanks @nikhil96sher
  • Adjusts test case.

nikhil96sher and others added 3 commits February 16, 2018 16:01
Signed-off-by: Nikhil Sheoran <nikhilsheoran96@gmail.com>
Uses `vertical` templates only.
@carltongibson carltongibson changed the title Pr/5768 Made TemplateHTMLRenderer render 0 for IntegerField inputs. Feb 16, 2018
@carltongibson carltongibson added this to the 3.8 Release milestone Feb 16, 2018
@carltongibson carltongibson changed the title Made TemplateHTMLRenderer render 0 for IntegerField inputs. Made TemplateHTMLRenderer render IntegerField inputs when value is 0. Feb 16, 2018
@carltongibson carltongibson merged commit e34fd99 into encode:master Feb 16, 2018
@carltongibson carltongibson deleted the pr/5768 branch February 16, 2018 15:48
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
…`. (encode#5834)

* Fix 0 value IntegerField in TemplateHTMLRenderer

Signed-off-by: Nikhil Sheoran <nikhilsheoran96@gmail.com>

* Remove unnecessary `field.value != “”` check

* Adjust test case

Uses `vertical` templates only.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants