tisn.app
tisn.app copied to clipboard
Regions without `shortCode` can't be selected
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:
- Go to update a user
- Select
Cayman Islands
as their country - Select any of its regions
- Click
Save
- 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.