diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-14 02:13:34 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-03-14 02:13:34 +0000 |
commit | edf29b571f6ca241d1d245eb92cd70df88460bb7 (patch) | |
tree | 6d8144c5dee9612a6eec45f225fe9fe703510030 /lib | |
parent | 2526d2dc449ee440f7b1ce62fbb4f3b217e3a5dc (diff) | |
parent | 2e1b2233ce92fadd81ce3e89e1cd1220b9730060 (diff) | |
download | gitlab-ce-edf29b571f6ca241d1d245eb92cd70df88460bb7.tar.gz |
Merge branch 'fix/regression-in-runners-registration-v1-api' into 'master'
Fix regression in runners registration v1 api
See merge request !9904
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/api/runners.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ci/api/runners.rb b/lib/ci/api/runners.rb index c1fd959ef14..45aa2adccf5 100644 --- a/lib/ci/api/runners.rb +++ b/lib/ci/api/runners.rb @@ -24,13 +24,13 @@ module Ci optional :locked, type: Boolean, desc: 'Lock this runner for this specific project' end post "register" do - runner_params = declared(params, include_missing: false) + runner_params = declared(params, include_missing: false).except(:token) runner = if runner_registration_token_valid? # Create shared runner. Requires admin access Ci::Runner.create(runner_params.merge(is_shared: true)) - elsif project = Project.find_by(runners_token: runner_params[:token]) + elsif project = Project.find_by(runners_token: params[:token]) # Create a specific runner for project. project.runners.create(runner_params) end |