-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
BooleanField Default Value Not Honored #738
Comments
Duplicate of #402 |
@davidism this seems to be a completely separate issue? Did you even read the code exceprts? |
@davidism Its completely clear that the code will not work as intended, why don't you leave the issue open so people can comment |
No Input = False, whats the point of having a default? |
Here is a non broken implementation of boolean
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Python 3.8 with WTForms == 3.0.1
It seems pretty clear the default input for BooleanField is broken
Doesn't matter what the default is, not having input for the field will result in False
From Field.process():
In Boolean Field
Looking at the tests these seem broken too:
Its clear to see that whenever the value isn't input it will be false.
The simplest change could be:
But to prevent any ambiguity in form parsing this is how BooleanField should work:
Input:
Parsing:
The text was updated successfully, but these errors were encountered: