Opened 16 years ago

Closed 16 years ago

#8008 closed (duplicate)

Bug wih SelectMultiple Widget when form is initialized with request.REQUEST dict

Reported by: Dimitri Gnidash Owned by: nobody
Component: Forms Version: 0.96
Severity: Keywords: SelectMultiple REQUEST widgets newforms
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The value_from_datadict() method of the SelectMultiple widget is using an isinstance() method to determine if the dictionary is a MultiValue one.
Since request.REQUEST is a MergeDict, the value_from_datadict method uses a get() method on the dictionary instead of the getlist()

def value_from_datadict(self, data, name):
  if isinstance(data, MultiValueDict):
    return data.getlist(name)
  return data.get(name, None)

Change History (1)

comment:1 by Matt McClanahan, 16 years ago

Resolution: duplicate
Status: newclosed

Dup of #7195.

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