Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-03 18:15:32 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-03 18:15:32 +0300
commit15b10c344b1b909b2a90331926aa4082cd86045b (patch)
tree6017e44e582518dba99b34519646ca08a962a540
parentb8abe0c980d12a48dc7b25cb8f3d560b89b5dcd2 (diff)
Dont remove duplicates in Runner.owned_or_shared since its not necessary
-rw-r--r--app/models/ci/runner.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb
index 2dfd038d5a8..23078f1c3ed 100644
--- a/app/models/ci/runner.rb
+++ b/app/models/ci/runner.rb
@@ -40,7 +40,10 @@ module Ci
}
scope :owned_or_shared, -> (project_id) do
- union = Gitlab::SQL::Union.new([belonging_to_project(project_id), belonging_to_parent_group_of_project(project_id), shared])
+ union = Gitlab::SQL::Union.new(
+ [belonging_to_project(project_id), belonging_to_parent_group_of_project(project_id), shared],
+ remove_duplicates: false
+ )
from("(#{union.to_sql}) ci_runners")
end