Opened 16 years ago

Closed 14 years ago

Last modified 13 years ago

#9161 closed (fixed)

ModelMultipleChoiceField doesn't respect to_field_name in validation.

Reported by: Honza Král Owned by: Gregor Müllegger
Component: Forms Version: dev
Severity: Keywords: modelchoicefield, modelmultiplechoicefield, to_field_name
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

I believe these should be consistent,

Attachments (2)

9161-against-9072.diff (1.9 KB ) - added by Honza Král 16 years ago.
issue9161.2.diff (2.3 KB ) - added by Gregor Müllegger 14 years ago.
against r15330

Download all attachments as: .zip

Change History (9)

by Honza Král, 16 years ago

Attachment: 9161-against-9072.diff added

comment:1 by Jacob, 16 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Thejaswi Puthraya, 16 years ago

Component: UncategorizedDatabase layer (models, ORM)

comment:3 by Gregor Müllegger, 14 years ago

Component: Database layer (models, ORM)Forms
Keywords: modelmultiplechoicefield to_field_name added
milestone: 1.3
Owner: changed from nobody to Gregor Müllegger
Status: newassigned
Summary: ModelMultipleChoiceField doesn't accept to_field_name whereas ModelChoiceField doesModelMultipleChoiceField doesn't respect to_field_name in validation.
Triage Stage: Design decision neededReady for checkin

This ticket is still valid. The to_field_name argument was already added to the ModelMultipleChoiceField however it ignores the argument for validation and expects primary keys. I will attach a patch for the current trunk.

You can find the patch also in this github fork/branch: https://github.com/gregmuellegger/django/tree/issue9161

by Gregor Müllegger, 14 years ago

Attachment: issue9161.2.diff added

against r15330

comment:4 by Gregor Müllegger, 14 years ago

Sorry, patch is against r15440.

comment:5 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: assignedclosed

In [15587]:

Fixed #9161 -- Ensure that ModelMultipleChoiceField respects to_field_name in validation. Thanks to Honza for the report, and Gregor Müllegger for the patch.

comment:6 by Russell Keith-Magee, 14 years ago

In [15588]:

[1.2.X] Fixed #9161 -- Ensure that ModelMultipleChoiceField respects to_field_name in validation. Thanks to Honza for the report, and Gregor Müllegger for the patch.

Backport of r15587 from trunk.

comment:7 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top