Code

Opened 7 years ago

Closed 7 years ago

#3788 closed (fixed)

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

Reported by: Max Derkachev <mderk@…> Owned by: adrian
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:

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

Download all attachments as: .zip

Change History (4)

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

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

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

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

  • Resolution duplicate deleted
  • Status changed from closed to reopened

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

comment:3 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

(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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.