diff options
author | James Lopez <james@gitlab.com> | 2018-05-11 13:32:43 +0300 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2018-05-11 13:32:43 +0300 |
commit | f811495e86aff85b0b9729b40a5fd00973157261 (patch) | |
tree | 814d2783e97a4001af1cf01b509920ad5d31dbbe /app | |
parent | 3a7d28597e3e23ef497186891662b4a85d013b08 (diff) | |
parent | 7c3e42f0196fdd13a61436d83c66418ca8ea6c3b (diff) |
Merge branch '10-8-stable-prepare-rc8-fix-conflict-for-18874' into '10-8-stable-prepare-rc8'
Fixes conflict when picking into prep branch
See merge request gitlab-org/gitlab-ce!18900
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/runner.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index 23078f1c3ed..9b76817b4c8 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -107,7 +107,13 @@ module Ci end def assign_to(project, current_user = nil) - self.is_shared = false if shared? + if shared? + self.is_shared = false if shared? + self.runner_type = :project_type + elsif group_type? + raise ArgumentError, 'Transitioning a group runner to a project runner is not supported' + end + self.save project.runner_projects.create(runner_id: self.id) end |