Code

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10307 closed (fixed)

us localflavor STATES_NOMALIZED incorrectly includes FM

Reported by: mnd 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: UI/UX:

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.

Attachments (0)

Change History (7)

comment:1 Changed 5 years ago by mnd

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Fix included in patch attached to ticket #10308.

comment:2 Changed 5 years ago by russellm

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

Closed as an effective duplicate of #10308

comment:3 Changed 5 years ago by kmtracey

  • Resolution duplicate deleted
  • Status changed from closed to reopened

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 Changed 5 years ago by kmtracey

  • Summary changed from FM missing from us_states.STATE_CHOICES to us localflavor STATES_NOMALIZED incorrectly includes FM

comment:5 Changed 5 years ago by mnd

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

comment:6 Changed 5 years ago by russellm

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

(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 Changed 5 years ago by russellm

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

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.