Opened 7 years ago

Closed 7 years ago

#8008 closed (duplicate)

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

Reported by: dimitri 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: UI/UX:


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 Changed 7 years ago by mattmcc

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

Dup of #7195.

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