20170822000001_agend_based_sender_issue_1351.rb 421 B

123456789101112131415
  1. class AgendBasedSenderIssue1351 < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. EmailAddress.all.each do |email_address|
  6. begin
  7. email_address.save!
  8. rescue => e
  9. Rails.logger.error "Unable to update EmailAddress.find(#{email_address.id}) '#{email_address.inspect}': #{e.message}"
  10. end
  11. end
  12. end
  13. end