0
0
Fork 0

Add migration tests for negative settings (#27012)

This commit is contained in:
Claire 2023-09-21 12:33:30 +02:00 committed by GitHub
parent c74670b4d3
commit 890e334703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -69,7 +69,7 @@ class MoveUserSettings < ActiveRecord::Migration[6.1]
MAPPING.each do |legacy_key, new_key|
value = previous_settings[legacy_key]&.value
next if value.blank?
next if value.nil?
if value.is_a?(Hash)
value.each do |nested_key, nested_value|