diff options
author | James Lopez <james@jameslopez.es> | 2017-05-05 18:18:39 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-05-05 18:18:39 +0200 |
commit | f15466bd5bd2ce5390e392785d7c750c176acbec (patch) | |
tree | 03e8a18381d133ad71fc1aef311a5b706fd11bfd | |
parent | 6ecf16b8f70335e1e6868b7c918cd031f5eb2f8d (diff) | |
download | gitlab-ce-f15466bd5bd2ce5390e392785d7c750c176acbec.tar.gz |
refactor code based on feedback
-rw-r--r-- | app/controllers/admin/services_controller.rb | 2 | ||||
-rw-r--r-- | app/services/projects/propagate_service_template.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index a40ce3c2418..4c3d336b3af 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -16,7 +16,7 @@ class Admin::ServicesController < Admin::ApplicationController def update if service.update_attributes(service_params[:service]) - PropagateServiceTemplateWorker.perform_async(service.id) if service.active? + PropagateServiceTemplateWorker.perform_async(service.id) if service.active? redirect_to admin_application_settings_services_path, notice: 'Application settings saved successfully' diff --git a/app/services/projects/propagate_service_template.rb b/app/services/projects/propagate_service_template.rb index 32ad68673ac..2999e1af385 100644 --- a/app/services/projects/propagate_service_template.rb +++ b/app/services/projects/propagate_service_template.rb @@ -11,7 +11,7 @@ module Projects end def propagate - return unless @template&.active + return unless @template&.active? Rails.logger.info("Propagating services for template #{@template.id}") |