Opened 10 years ago

Closed 10 years ago

#3788 closed (fixed)

[patch] newforms.fields.MultiValueField.clean should check for IndexError

Reported by: Max Derkachev <mderk@…> Owned by: Adrian Holovaty
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: UI/UX:


MultiValueField.clean checks for KeyError while enumerating self.fields, while it should check for IndexError instead.

Attachments (1)

fields_multivaluefield.patch (513 bytes) - added by Max Derkachev <mderk@…> 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Max Derkachev <mderk@…>

comment:1 Changed 10 years ago by Gary Wilson <gary.wilson@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: duplicate
Status: newclosed

Marking a duplicate of #3787 since it is mentioned and included in the patch in that ticket.

comment:2 Changed 10 years ago by Max Derkachev <mderk@…>

Resolution: duplicate
Status: closedreopened

Not a duplicate.
#3787 is about widgets.MultiWidget, not fields.MultiValueField

comment:3 Changed 10 years ago by Russell Keith-Magee

Resolution: fixed
Status: reopenedclosed

(In [5088]) Fixed #3787, #3788 -- Corrected check for IndexError on MultiValueField, and fixed the value_from_datadict method for MultiWidgets to handle Multiwidgets containing Multiwidgets. Also added a testcase walking through the use of MultiWidget/MultiValueField. Thanks to Max Derkachev for reporting these issues and providing fixes.

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