Opened 18 years ago
Closed 18 years ago
#5959 closed (fixed)
BooleanField should clean the string 'False' to boolean False
| Reported by: | Chris Beaven | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Currently the comment says:
# Explicitly check for the string '0', which is what as hidden field # will submit for False.
But that's just blatantly incorrect, the HiddenInput widget submits the string 'False' for False.
There are a couple of solutions here, I have chosen the first in the initial patch, due to the fact it's in-line with what happens already:
- The
BooleanFieldshould clean'False'toFalse
- The
HiddenInputshould renderFalseas''
- A new
HiddenBooleanInputwidget should be created and linked toBooleanField.hidden_widget(ugh)
Attachments (1)
Change History (3)
by , 18 years ago
| Attachment: | boolean_hidden.diff added |
|---|
comment:1 by , 18 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:2 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I'll promote to checkin because I'm pretty sure option 1 is the right course of action. If the committer has any concerns that I haven't chosen the correct solution, kick it back.