Improved error handling.
This commit is contained in:
parent
cd799f0d74
commit
5c9e3d8928
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@ class AddSettingOnlineService2 < ActiveRecord::Migration
|
|||
add_column :channels, :preferences, :string, limit: 2000, null: true
|
||||
Channel.reset_column_information
|
||||
Channel.where(area: 'Email::Notification').each {|channel|
|
||||
channel.preferences = {}
|
||||
channel.preferences[:online_service_disable] = true
|
||||
channel.save
|
||||
}
|
||||
|
@ -21,6 +22,7 @@ class AddSettingOnlineService2 < ActiveRecord::Migration
|
|||
EmailAddress.reset_column_information
|
||||
EmailAddress.all.each {|email_address|
|
||||
next if email_address.email !~ /zammad/i
|
||||
email_address.preferences = {}
|
||||
email_address.preferences[:online_service_disable] = true
|
||||
email_address.save
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue