Chore: Fix data migration in notification settings (#797)

This commit is contained in:
Pranav Raj S 2020-05-01 22:30:57 +05:30 committed by GitHub
parent d4ff9f5b45
commit 8f0c4281c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ class CreateNotifications < ActiveRecord::Migration[6.0]
def add_push_settings_to_users
::User.find_in_batches do |users_batch|
users_batch.each do |user|
user_notification_setting = user.notification_settings
user_notification_setting = user.notification_settings.first
user_notification_setting.push_conversation_assignment = true
user_notification_setting.save!
end