Code

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14166 closed (fixed)

Indian states are not specified as a tuple of tuples

Reported by: gogna Owned by: nobody
Component: contrib.localflavor Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Indian states in in_states.py are specified as a simple tuple of single elements:

STATE_CHOICES = (
    'KA', 'Karnataka',
    'AP', 'Andhra Pradesh',
    'KL', 'Kerala',
    'TN', 'Tamil Nadu',

where it should be as a tuple of 2-elements tuple, as:

STATE_CHOICES = (
    ('KA', 'Karnataka'),
    ('AP', 'Andhra Pradesh'),
    ('KL', 'Kerala'),
    ('TN', 'Tamil Nadu'),

This result in a too many values to unpack error when using the class INStateSelect

Attachments (1)

in_states.diff (2.1 KB) - added by gogna 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by gogna

comment:1 Changed 4 years ago by lrekucki

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

Bug is obvious and the patch is trivial, so marking it as RFC.

comment:2 Changed 4 years ago by russellm

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

(In [13656]) Fixed #14166 -- Modified the list of state choices in the Indian localflavor to be a list of tuples, not just a list of values. Thanks to gogna for the report and patch.

comment:3 Changed 4 years ago by russellm

(In [13657]) [1.2.X] Fixed #14166 -- Modified the list of state choices in the Indian localflavor to be a list of tuples, not just a list of values. Thanks to gogna for the report and patch.

Backport of r13656 from trunk.

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.