Opened 11 years ago

Closed 11 years ago

#7668 closed (invalid)

newforms.ModelChoiceField fails to clean()

Reported by: Jamey Hicks <jamey.hicks@…> Owned by: nobody
Component: Forms Version: master
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


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

Attachments (1)

newform.patch (533 bytes) - added by Jamey Hicks <jamey.hicks@…> 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by Jamey Hicks <jamey.hicks@…>

Attachment: newform.patch added


comment:1 Changed 11 years ago by Matt McClanahan

Resolution: invalid
Status: newclosed

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.
Back to Top