Refactor get_spatial_for_selection() to ensure unique values and prioritize municipality keys
The get_spatial_for_selection() function has been refactored to address the issue of duplicate values in the spatial mapping list. Additionally, the code now prioritizes municipality keys over other keys when multiple keys are available for the same value.
Changes made:
- Added logic to filter out duplicate values in the spatial mapping list
- Modified the selection process to prefer municipality keys over other keys
- Added comments to improve code readability and maintainability
These changes ensure that the selection list for spatial references in the data set creation/editing interface only contains unique values, with municipality keys taking precedence when available.
Closes #12 (closed)