diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-11 22:58:18 +0800 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-12 00:05:36 +0800 |
commit | 2f76ff19f8f520a584a1259bd0c779e988cd7360 (patch) | |
tree | bd520f3064a21ece51da2418f2f3b67c2bacfc4f /lib/banzai | |
parent | 6b2f81f6078e96f081154c50dc25e54fe7c09d6f (diff) | |
download | gitlab-ce-2f76ff19f8f520a584a1259bd0c779e988cd7360.tar.gz |
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.rb | 4 |
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 |