Opened 18 years ago

Closed 18 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: 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

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@…> 18 years ago.

Download all attachments as: .zip

Change History (4)

by Max Derkachev <mderk@…>, 18 years ago

comment:1 by Gary Wilson <gary.wilson@…>, 18 years ago

Resolution: duplicate
Status: newclosed

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

comment:2 by Max Derkachev <mderk@…>, 18 years ago

Resolution: duplicate
Status: closedreopened

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

comment:3 by Russell Keith-Magee, 18 years ago

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