Opened 5 years ago

Closed 5 years ago

Last modified 5 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 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by gogna

comment:1 Changed 5 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 5 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 5 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.

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