-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
bug: In browsable API HTML forms boolean fields do not change correctly #2776
Comments
I have also just noticed that you can change them from false to true then it will change as expected, but once they are set to true you cannot change it to false using the HTML form. |
I noticed the same behaviour before, but dismissed on lack of coffee. |
This was occuring if |
Unfortunately, I still see this issue where checking the checkbox corresponding to a BooleanField in the browsable API HTML form has no effect. The BooleanField is always set to False whether the checkbox is checked or not. I am using
My model in question looks as follows:
The corresponding ModelSerializer is:
What other information should I provide to help replicate this issue at your end? Also, should this issue be reopened? |
The bug still is not resolved on djangorestframework v3.11.1. Changing the boolean value via RAW data works, but via html form it doesn't (you can change from False to True, but not the other way). |
Testing with the DRF tutorial with the |
Hi, I am using REST framework v3.1.1 and I noticed that BooleanFields on the HTML form inside the
browsable API does not take effect and change the data as expected.
To reproduce:
Make a serializer with some boolean fields
In the browsable API's HTML form, try to edit the boolean checkbox
Compare the result returned with the expected output
Every time I have to explicitly change the values in the raw data for the expected change to occur
before the POST and PUT request is made
The text was updated successfully, but these errors were encountered: