summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-24 12:24:41 +0200
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-31 10:56:28 +0200
commitda75618bebe57132f847df733625cc4757f8084d (patch)
tree24cee77d2cf584e2df62708ff8510ce169302e0f /app/models
parent03ff1da278117ce36aaec4e0af267bbc07dc571c (diff)
downloadgitlab-ce-da75618bebe57132f847df733625cc4757f8084d.tar.gz
Make Ci::Runner#assign_to keep returning RunnerProject
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/runner.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb
index ac9f04bb3d4..5cec88660f8 100644
--- a/app/models/ci/runner.rb
+++ b/app/models/ci/runner.rb
@@ -120,8 +120,9 @@ module Ci
raise ArgumentError, 'Transitioning a group runner to a project runner is not supported'
end
- self.projects << project
+ runner_project = project.runner_projects.create(runner_id: self.id)
self.save!
+ runner_project
end
def display_name