diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/finders/packages/group_packages_finder.rb | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/finders/packages/group_packages_finder.rb')
-rw-r--r-- | app/finders/packages/group_packages_finder.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/finders/packages/group_packages_finder.rb b/app/finders/packages/group_packages_finder.rb index 23b0e71d836..1d1ae59674a 100644 --- a/app/finders/packages/group_packages_finder.rb +++ b/app/finders/packages/group_packages_finder.rb @@ -22,11 +22,11 @@ module Packages def packages_for_group_projects(installable_only: false) packages = ::Packages::Package - .preload_pipelines .including_project_route .including_tags .for_projects(group_projects_visible_to_current_user.select(:id)) .sort_by_attribute("#{params[:order_by]}_#{params[:sort]}") + packages = packages.preload_pipelines if preload_pipelines packages = filter_with_version(packages) packages = filter_by_package_type(packages) @@ -59,5 +59,9 @@ module Packages def exclude_subgroups? params[:exclude_subgroups] end + + def preload_pipelines + params.fetch(:preload_pipelines, true) + end end end |