#11860 closed (fixed)
Changing a NullBooleanField from "unknown" to "no" in the admin does not save
| Reported by: | Greg Brown | Owned by: | matiasb |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.1 |
| Severity: | Keywords: | nullboolean dirty | |
| 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
This only occurs if the nullboolean is the only thing changed - if I change another field in the form at the same time, it works.
I'm assuming that the problem is that the form isn't being marked as dirty by the nullbooleanfield when it should be.
Attachments (1)
Change History (11)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| milestone: | → 1.2 |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:3 by , 16 years ago
| Component: | Uncategorized → django.contrib.admin |
|---|
comment:4 by , 16 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
by , 16 years ago
| Attachment: | nullbooleanselect_patch.diff added |
|---|
Fixed _has_changed method of NullBooleanSelect widget to distinguish between None and False (updated)
comment:6 by , 16 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:7 by , 16 years ago
One issue with the test might be that the test still passes after if I uncomment all the lines of the _has_changed method except the return initial != data line.
comment:8 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:9 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
Note - this only occurs when the model is registered in an admin inline.