tisn.app icon indicating copy to clipboard operation
tisn.app copied to clipboard

Regions without `shortCode` can't be selected

Open AlbertoPdRF opened this issue 4 years ago • 0 comments

Describe the bug

We are using country-region-data as our list of countries and regions. It turns out that there are some regions without short codes, as can be seen in https://github.com/country-regions/country-region-data/issues/70. As a result of this, there are some regions that can't be selected when creating/updating a user or an event, as we expect them to have a short code.

To Reproduce Steps to reproduce the behavior:

  1. Go to update a user
  2. Select Cayman Islands as their country
  3. Select any of its regions
  4. Click Save
  5. See error

Expected behavior

Regions without short codes should be selectable too.

Additional context

This problem was originally discovered here. As done there, we can use the region name as a fallback until the upstream issue referenced above is fixed.

AlbertoPdRF avatar Oct 05 '20 15:10 AlbertoPdRF