summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2015-10-22 12:03:20 +0000
committerRobert Speicher <rspeicher@gmail.com>2015-10-22 14:04:30 +0200
commit613f368ce576daf10d79d3c39ddf600cc0d9f6c7 (patch)
tree0becf43748659567fbd310aaf9c42bb1c36c8f7b
parent00244a896943a51096a02e18ce93a0963d55d15a (diff)
downloadgitlab-ce-613f368ce576daf10d79d3c39ddf600cc0d9f6c7.tar.gz
Merge branch 'fix-ci-services-editing' into 'master'
Fix 500 when editing CI services Fixes #3090 See merge request !1663
-rw-r--r--CHANGELOG1
-rw-r--r--app/controllers/projects/ci_services_controller.rb8
2 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index bc630aa2c04..c3a76b1fc15 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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)
- Make diff file view easier to use on mobile screens (Stan Hu)
- 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)
- Add support for creating directories from Files page (Stan Hu)
- Allow removing of project without confirmation when JavaScript is disabled (Stan Hu)
diff --git a/app/controllers/projects/ci_services_controller.rb b/app/controllers/projects/ci_services_controller.rb
index 406f313ae79..550a019e8e2 100644
--- a/app/controllers/projects/ci_services_controller.rb
+++ b/app/controllers/projects/ci_services_controller.rb
@@ -14,17 +14,17 @@ class Projects::CiServicesController < Projects::ApplicationController
end
def update
- if @service.update_attributes(service_params)
- redirect_to edit_namespace_project_ci_service_path(@project, @project.namespace, @service.to_param)
+ if service.update_attributes(service_params)
+ redirect_to edit_namespace_project_ci_service_path(@project.namespace, @project, service.to_param)
else
render 'edit'
end
end
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' }
else
message = { alert: 'We tried to test the service but error occurred' }