mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Fixed a bug where default distance unit was not being set for users. #1206
This commit is contained in:
parent
cf3b7a116d
commit
3e8e49139a
3 changed files with 8 additions and 2 deletions
|
|
@ -1 +1 @@
|
|||
0.26.2
|
||||
0.26.3
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
# 0.26.3 - 2025-05-18
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed a bug where default distance unit was not being set for users. #1206
|
||||
|
||||
|
||||
# 0.26.2 - 2025-05-18
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class SetDefaultDistanceUnitForUser < ActiveRecord::Migration[8.0]
|
|||
User.find_each do |user|
|
||||
map_settings = user.settings['maps']
|
||||
|
||||
next if map_settings['distance_unit'].in?(%w[km mi])
|
||||
next if map_settings.try(:[], 'distance_unit')&.in?(%w[km mi])
|
||||
|
||||
if map_settings.blank?
|
||||
map_settings = { distance_unit: 'km' }
|
||||
|
|
|
|||
Loading…
Reference in a new issue