diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-10 12:16:26 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-10 13:31:18 +0300 |
commit | 84fa061086250b9f59eb51eb8728702dfedb7546 (patch) | |
tree | cb8de4db6bf6e8c64d09bafe60ef2532ae709921 /app/models/ci | |
parent | 063b6b75be97440a96cda109bcb9d448920c7e49 (diff) |
Ensure runner_type is updated correctly when assigning shared runner to project
Diffstat (limited to 'app/models/ci')
-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 |