Opened 16 years ago
Closed 16 years ago
#7668 closed (invalid)
newforms.ModelChoiceField fails to clean()
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
newforms ModelChoiceField successfully resolves a value given a primary key pk, but then in clean() attempts to look it up again using the object named by value rather than value.pk.
Attachments (1)
Change History (2)
by , 16 years ago
Attachment: | newform.patch added |
---|
comment:1 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You're most likely doing something wrong. The value sent to the clean method is the PK value.
Note:
See TracTickets
for help on using tickets.
patch