diff --git a/app/models/object_manager/attribute.rb b/app/models/object_manager/attribute.rb index 67cf7e7e9..c94bc503f 100644 --- a/app/models/object_manager/attribute.rb +++ b/app/models/object_manager/attribute.rb @@ -473,9 +473,13 @@ returns [record1, record2, ...] +to send no browser reload event, pass false + + ObjectManager::Attribute.migration_execute(false) + =end - def self.migration_execute + def self.migration_execute(send_event = true) # check if field already exists execute_count = 0 @@ -592,7 +596,7 @@ returns } # sent maintenance message to clients - if execute_count != 0 + if send_event && execute_count != 0 if ENV['APP_RESTART_CMD'] AppVersion.set(true, 'restart_auto') sleep 4 diff --git a/lib/import/zendesk.rb b/lib/import/zendesk.rb index 44655f1e9..f2933ef79 100644 --- a/lib/import/zendesk.rb +++ b/lib/import/zendesk.rb @@ -456,7 +456,7 @@ module Import::Zendesk created_by_id: 1, updated_by_id: 1, ) - ObjectManager::Attribute.migration_execute + ObjectManager::Attribute.migration_execute(false) end # OAuth @@ -1001,7 +1001,7 @@ module Import::Zendesk # https://developer.zendesk.com/rest_api/docs/core/automations def import_automations - @client.automations.all! { |zendesk_automation| + @client.automations.all! { |_zendesk_automation| # "url" => "https://example.zendesk.com/api/v2/automations/60037892.json" # "id" => 60037892