20170822000001_agend_based_sender_issue_1351.rb 472 B

1234567891011121314151617
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class AgendBasedSenderIssue1351 < ActiveRecord::Migration[4.2]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. EmailAddress.all.each do |email_address|
  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