Commit a7cb1263 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix updating settings for pipelines

parent 8ead4b22
...@@ -50,20 +50,14 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -50,20 +50,14 @@ class Projects::PipelinesController < Projects::ApplicationController
end end
def update_settings def update_settings
status = ::Projects::UpdateService.new(@project, current_user, pipelines_settings_params).execute if @project.update_attributes(pipelines_settings_params)
flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated."
respond_to do |format| redirect_to(
if status settings_namespace_project_pipelines_path(@project.namespace, @project),
flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated."
format.html do )
redirect_to( else
settings_namespace_project_pipelines_path(@project.namespace, @project), render 'settings'
notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated."
)
end
else
format.html { render 'settings' }
end
end end
end end
......
...@@ -23,7 +23,6 @@ module Projects ...@@ -23,7 +23,6 @@ module Projects
if project.previous_changes.include?('path') if project.previous_changes.include?('path')
project.rename_repo project.rename_repo
end end
true
end end
end end
end end
......
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