Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#10307 closed (fixed)

us localflavor STATES_NOMALIZED incorrectly includes FM

Reported by: MonteDavidoff Owned by: nobody
Component: contrib.localflavor Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In django.contrib.localflavor.us.us_states, STATE_CHOICES is missing an entry for FM (Federated States of Micronesia). FM is already present in STATES_NORMALIZED.

>>> from django.contrib.localflavor.us.us_states import *
>>> len(STATE_CHOICES)
56
>>> len(set(STATES_NORMALIZED.values()))
57
>>> set(STATES_NORMALIZED.values()) - set(s[0] for s in STATE_CHOICES)
set(['FM'])
>>> 

According to http://www.usps.com/ncsc/lookups/usps_abbreviations.html, FM is a valid state abbreviation.

Change History (7)

comment:1 by MonteDavidoff, 16 years ago

Fix included in patch attached to ticket #10308.

comment:2 by Russell Keith-Magee, 16 years ago

Resolution: duplicate
Status: newclosed

Closed as an effective duplicate of #10308

comment:3 by Karen Tracey, 16 years ago

Resolution: duplicate
Status: closedreopened

I think there's still a problem to fix here. As #10308 notes, Micronesia was intentionally removed from the list of US states. But it is still in STATES_NORMALIZED. I think it needs to be removed from STATES_NORMALIZED as well.

comment:4 by Karen Tracey, 16 years ago

Summary: FM missing from us_states.STATE_CHOICESus localflavor STATES_NOMALIZED incorrectly includes FM

comment:5 by MonteDavidoff, 16 years ago

Thanks for the explanation. I agree removing FM from STATES_NOMALIZED is the thing to do.

comment:6 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: reopenedclosed

(In [9855]) Fixed #10307 -- Removed references to FM/Federated States of Micronesia from the US localflavor STATES_NORMALIZED setting. Thanks to mnd for the report.

comment:7 by Russell Keith-Magee, 16 years ago

(In [9885]) [1.0.X] Fixed #10307 -- Removed references to FM/Federated States of Micronesia from the US localflavor STATES_NORMALIZED setting. Thanks to mnd for the report.

Merge of r9855 from trunk.

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