diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-04 06:10:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-04 06:10:53 +0300 |
commit | 982880576eb35b48caf6791687d4f023136cca25 (patch) | |
tree | 0d7df1f676a920a15250f5789c60111d21681cde /app/finders | |
parent | ff71e5f91c447686ab7bec7407dba0d4738a8807 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/projects/topics_finder.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/finders/projects/topics_finder.rb b/app/finders/projects/topics_finder.rb index c26b166a786..fb0a77db548 100644 --- a/app/finders/projects/topics_finder.rb +++ b/app/finders/projects/topics_finder.rb @@ -13,6 +13,7 @@ module Projects def execute topics = Projects::Topic.order_by_non_private_projects_count + topics = by_without_projects(topics) by_search(topics) end @@ -25,5 +26,11 @@ module Projects topics.search(params[:search]).reorder_by_similarity(params[:search]) end + + def by_without_projects(topics) + return topics unless params[:without_projects] + + topics.without_assigned_projects + end end end |