Code

Opened 7 years ago

Closed 7 years ago

#3129 closed defect (duplicate)

MultipleChoiceField doesn't handle correctly QueryDict

Reported by: anonymous Owned by: adrian
Component: Forms Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

class SongForm(Form):
    composers = MultipleChoiceField(choices=[('J', 'John'), ('P', 'Paul')])

When I try to pass a request.POST to the form:

form = SongForm(request.POST)

If I check one or more options, it raises a ValidationError 'Enter a list of values.'.

Attachments (1)

multiple_choice_tests.patch (953 bytes) - added by Massimiliano Ravelli 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Massimiliano Ravelli

comment:1 Changed 7 years ago by anonymous

I've added a patch to the forms regression tests.
If you need a test case please let me now.

comment:2 Changed 7 years ago by Massimiliano Ravelli <massimiliano.ravelli@…>

  • Resolution set to duplicate
  • Status changed from new to closed

Closing as duplicate of #3114 and #3131.

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.