Commit 613f368c authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'fix-ci-services-editing' into 'master'

Fix 500 when editing CI services

Fixes #3090

See merge request !1663
parent 00244a89
...@@ -17,6 +17,7 @@ v 8.1.0 ...@@ -17,6 +17,7 @@ v 8.1.0
- Add a system note and update relevant merge requests when a branch is deleted or re-added (Stan Hu) - Add a system note and update relevant merge requests when a branch is deleted or re-added (Stan Hu)
- Make diff file view easier to use on mobile screens (Stan Hu) - Make diff file view easier to use on mobile screens (Stan Hu)
- Improved performance of finding users by username or Email address - Improved performance of finding users by username or Email address
- Fix 500 when editing CI service
- Fix bug where merge request comments created by API would not trigger notifications (Stan Hu) - Fix bug where merge request comments created by API would not trigger notifications (Stan Hu)
- Add support for creating directories from Files page (Stan Hu) - Add support for creating directories from Files page (Stan Hu)
- Allow removing of project without confirmation when JavaScript is disabled (Stan Hu) - Allow removing of project without confirmation when JavaScript is disabled (Stan Hu)
......
...@@ -14,17 +14,17 @@ class Projects::CiServicesController < Projects::ApplicationController ...@@ -14,17 +14,17 @@ class Projects::CiServicesController < Projects::ApplicationController
end end
def update def update
if @service.update_attributes(service_params) if service.update_attributes(service_params)
redirect_to edit_namespace_project_ci_service_path(@project, @project.namespace, @service.to_param) redirect_to edit_namespace_project_ci_service_path(@project.namespace, @project, service.to_param)
else else
render 'edit' render 'edit'
end end
end end
def test def test
last_build = @project.builds.last last_build = @project.ci_builds.last
if @service.execute(last_build) if service.execute(last_build)
message = { notice: 'We successfully tested the service' } message = { notice: 'We successfully tested the service' }
else else
message = { alert: 'We tried to test the service but error occurred' } message = { alert: 'We tried to test the service but error occurred' }
......
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