diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-08 00:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-08 00:09:00 +0300 |
commit | 9a4d2a38dc79330beb9f8ffb44d88a1b8f699d75 (patch) | |
tree | 482027505bc0ba0a857f1aaa6a9653e4f9ddd5b1 /app/finders | |
parent | 5cda8c8a420399ca9687c4a981fefd50ce5a1fdd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/issuable_finder.rb | 4 | ||||
-rw-r--r-- | app/finders/issuable_finder/params.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index fe07a52cbf0..6bbbc237e62 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -316,10 +316,8 @@ class IssuableFinder # rubocop: disable CodeReuse/ActiveRecord def by_project(items) - if params.project? + if params.project? || params.projects items.of_projects(params.projects).references_project - elsif params.projects - items.merge(params.projects.reorder(nil)).join_project else items.none end diff --git a/app/finders/issuable_finder/params.rb b/app/finders/issuable_finder/params.rb index 359a56bd39b..b0b5301f021 100644 --- a/app/finders/issuable_finder/params.rb +++ b/app/finders/issuable_finder/params.rb @@ -175,7 +175,7 @@ class IssuableFinder return Project.none unless group if params[:include_subgroups] - Project.where(namespace_id: group.self_and_descendants) # rubocop: disable CodeReuse/ActiveRecord + Project.where(namespace_id: group.self_and_descendant_ids) # rubocop: disable CodeReuse/ActiveRecord else group.projects end |