diff options
author | Robert Speicher <robert@gitlab.com> | 2018-03-19 19:01:40 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-03-19 20:41:07 +0300 |
commit | 337403df4cca27a5520170efcd6882762c0b56c1 (patch) | |
tree | 39b4c1b808edc69a0d4261cffec760c0782e7575 /app/finders | |
parent | fb3ecaf17390707c83e99baec4cbdd19f4ce6154 (diff) |
Merge branch 'sh-admin-projects-remove-n-plus-one' into 'master'
Remove N+1 queries in /admin/projects page
See merge request gitlab-org/gitlab-ce!17834
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/admin/projects_finder.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/finders/admin/projects_finder.rb b/app/finders/admin/projects_finder.rb index 5c507fe8d50..2c8f21c2400 100644 --- a/app/finders/admin/projects_finder.rb +++ b/app/finders/admin/projects_finder.rb @@ -16,6 +16,7 @@ class Admin::ProjectsFinder items = by_archived(items) items = by_personal(items) items = by_name(items) + items = items.includes(namespace: [:owner]) sort(items).page(params[:page]) end |