Opened 17 years ago
Closed 17 years ago
#5471 closed (fixed)
BooleanField fails to work when processing data from as_hidden
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | BooleanField as_hidden | |
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
If a BooleanField is referenced in the Template with .as_hidden then the returned value for False is '0'. Since BooleanField does a simple bool() in clean, this is converted to True.
The patch adds an explicit check for '0' and returns false in this case.
Attachments (1)
Change History (3)
by , 17 years ago
Attachment: | newforms_fields_py.patch added |
---|
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch for newforms/fields.py