Merge pull request #6689 from aignatov-bio/ai-sci-fix-notification-migration-format

Symbolize keys
This commit is contained in:
aignatov-bio 2023-11-22 15:25:11 +01:00 committed by GitHub
commit 8a3f56d09d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ class FixNotificationMigration < ActiveRecord::Migration[7.0]
Notification.find_each do |notification|
parsed_params = JSON.parse(notification.params)
parsed_params.delete('_aj_symbol_keys')
notification.update!(params: parsed_params)
notification.update!(params: parsed_params.symbolize_keys)
end
end
end