Refactoring: Improved ExternalSync source name for Exchange.

This commit is contained in:
Thorsten Eckel 2018-01-08 16:22:06 +01:00
parent 4abd20a49f
commit 702b792eb9
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,10 @@
class ChangeExchangeExternalSyncIdentifier < ActiveRecord::Migration[5.1]
def up
# return if it's a new setup to avoid running the migration
return if !Setting.find_by(name: 'system_init_done')
# rubocop:disable Rails/SkipsModelValidations
ExternalSync.where(source: 'EWS::FolderContact').update_all(source: 'Exchange::FolderContact')
end
end

View file

@ -9,7 +9,7 @@ class Sequencer
def process
state.provide(:model_class, ::User)
state.provide(:external_sync_source, 'EWS::FolderContact')
state.provide(:external_sync_source, 'Exchange::FolderContact')
end
end
end