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:
authorHeinrich Lee Yu <hleeyu@gmail.com>2019-01-11 17:58:18 +0300
committerHeinrich Lee Yu <hleeyu@gmail.com>2019-01-11 19:05:36 +0300
commit2f76ff19f8f520a584a1259bd0c779e988cd7360 (patch)
treebd520f3064a21ece51da2418f2f3b67c2bacfc4f /lib/banzai
parent6b2f81f6078e96f081154c50dc25e54fe7c09d6f (diff)
Fix MilestonesFinder to pass relations to scope
Instead of querying relations into ids we just pass them to the model scope because the scope supports it now. Also changes other calls to `Milestone.for_projects_and_groups`
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/milestone_reference_filter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/banzai/filter/milestone_reference_filter.rb b/lib/banzai/filter/milestone_reference_filter.rb
index c70c3f0c04e..fce042e8946 100644
--- a/lib/banzai/filter/milestone_reference_filter.rb
+++ b/lib/banzai/filter/milestone_reference_filter.rb
@@ -101,9 +101,9 @@ module Banzai
def self_and_ancestors_ids(parent)
if group_context?(parent)
- parent.self_and_ancestors_ids
+ parent.self_and_ancestors.select(:id)
elsif project_context?(parent)
- parent.group&.self_and_ancestors_ids
+ parent.group&.self_and_ancestors&.select(:id)
end
end