Commit f15466bd authored by James Lopez's avatar James Lopez

refactor code based on feedback

parent 6ecf16b8
...@@ -16,7 +16,7 @@ class Admin::ServicesController < Admin::ApplicationController ...@@ -16,7 +16,7 @@ class Admin::ServicesController < Admin::ApplicationController
def update def update
if service.update_attributes(service_params[:service]) 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, redirect_to admin_application_settings_services_path,
notice: 'Application settings saved successfully' notice: 'Application settings saved successfully'
......
...@@ -11,7 +11,7 @@ module Projects ...@@ -11,7 +11,7 @@ module Projects
end end
def propagate def propagate
return unless @template&.active return unless @template&.active?
Rails.logger.info("Propagating services for template #{@template.id}") Rails.logger.info("Propagating services for template #{@template.id}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment