Code

Opened 7 years ago

Closed 7 years ago

#3405 closed (duplicate)

[patch] newforms: choices checking should unicode choices list before comparing to a value

Reported by: anton@… 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

Hello everyone

There is a mistake in django/newforms/fields.py:

when one uses ChoiceField to select a value from predefined choices it tries to validate selected choice against a list of string values, should be a list of unicode values as it's done in MultipleChoiceField

Without the patch one always gets "Select a valid choice. %s is not one of the available choices." ValidationError.

Patch works with my previous #3401

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by anton@…

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

sorry, duplicate (browser hung)

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.