Skip to content

US US_STATES is sorted incorrectly #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ses4j opened this issue Jan 21, 2021 · 2 comments · Fixed by #428
Closed

US US_STATES is sorted incorrectly #424

ses4j opened this issue Jan 21, 2021 · 2 comments · Fixed by #428

Comments

@ses4j
Copy link
Contributor

ses4j commented Jan 21, 2021

https://github.com/django/django-localflavor/blob/master/localflavor/us/us_states.py

The US_STATES enum is sorted by state code, but STATE_CHOICES (and old Django versions such as django/django@4b2b2eda24) are sorted by state name. The net effect is that Nevada SHOULD sort before New Jersey, but in fact sorts after since NV is after NJ.

@benkonrath
Copy link
Member

@ses4j Thanks for letting us know. Any chance you can make a PR to fix this?

@ses4j
Copy link
Contributor Author

ses4j commented Feb 19, 2021

@benkonrath done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants