Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14166 closed (fixed)

Indian states are not specified as a tuple of tuples

Reported by: Flavio Curella 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 Flavio Curella 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Flavio Curella

Attachment: in_states.diff added

comment:1 Changed 6 years ago by Łukasz Rekucki

Triage Stage: UnreviewedReady for checkin

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

comment:2 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(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 6 years ago by Russell Keith-Magee

(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.

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