diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-10 11:16:26 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-10 12:31:18 +0200 |
commit | 84fa061086250b9f59eb51eb8728702dfedb7546 (patch) | |
tree | cb8de4db6bf6e8c64d09bafe60ef2532ae709921 /app/models/ci/runner.rb | |
parent | 063b6b75be97440a96cda109bcb9d448920c7e49 (diff) | |
download | gitlab-ce-84fa061086250b9f59eb51eb8728702dfedb7546.tar.gz |
Ensure runner_type is updated correctly when assigning shared runner to project
Diffstat (limited to 'app/models/ci/runner.rb')
-rw-r--r-- | app/models/ci/runner.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index ed8b30dae49..359a87a3f77 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -108,7 +108,11 @@ 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 + end + self.save project.runner_projects.create(runner_id: self.id) end |