summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2015-10-22 12:03:20 +0000
committerRobert Speicher <robert@gitlab.com>2015-10-22 12:03:20 +0000
commitb97977afef26e8aaad9228c8c7dffecdbe1a8e59 (patch)
tree8256a4c2848442a99a82728533d45806cc26c9ab /app
parentb3e10e37f73a54be769c402265d78d0436b305fa (diff)
parent40934ae39bc9aea6ffb176f96bba72fa688de837 (diff)
downloadgitlab-ce-b97977afef26e8aaad9228c8c7dffecdbe1a8e59.tar.gz
Merge branch 'fix-ci-services-editing' into 'master'
Fix 500 when editing CI services Fixes #3090 See merge request !1663
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/ci_services_controller.rb8
1 files changed, 4 insertions, 4 deletions
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' }