Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.

Commit 9aca33e

Browse files
committed
Fix adding runner to project
1 parent 45a0336 commit 9aca33e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/controllers/runner_projects_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def index
1010
def create
1111
@runner = Runner.find(params[:runner_project][:runner_id])
1212

13-
if @runner.assign_to(@project, current_user)
13+
if @runner.assign_to(project, current_user)
1414
redirect_to project_runner_projects_path
1515
else
1616
redirect_to project_runner_projects_path, alert: 'Failed adding runner deploy key to GitLab project'

app/models/runner.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def assign_to(project, current_user)
3838
raise "Can't add deploy key" unless result
3939
end
4040
rescue => ex
41+
logger.warn "Assign runner to project failed: #{ex}"
4142
false
4243
end
4344
end

0 commit comments

Comments
 (0)