提交 a7cb1263 编写于 作者: K Kamil Trzcinski

Fix updating settings for pipelines

上级 8ead4b22
......@@ -50,20 +50,14 @@ class Projects::PipelinesController < Projects::ApplicationController
end
def update_settings
status = ::Projects::UpdateService.new(@project, current_user, pipelines_settings_params).execute
respond_to do |format|
if status
flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated."
format.html do
redirect_to(
settings_namespace_project_pipelines_path(@project.namespace, @project),
notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated."
)
end
else
format.html { render 'settings' }
end
if @project.update_attributes(pipelines_settings_params)
flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated."
redirect_to(
settings_namespace_project_pipelines_path(@project.namespace, @project),
notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated."
)
else
render 'settings'
end
end
......
......@@ -23,7 +23,6 @@ module Projects
if project.previous_changes.include?('path')
project.rename_repo
end
true
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册