summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-19 17:24:57 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 22:49:41 +0200
commit29df1ce84198801863fd1890b14099d13c6ec7fb (patch)
tree73511d4f9d3a3d0cd597a734a086bf655f1ad8df /app/finders
parent22aa034427b9392b44d9ecba0a51bb1b6c6616d7 (diff)
downloadgitlab-ce-29df1ce84198801863fd1890b14099d13c6ec7fb.tar.gz
Improve number of queries
And document what extra queries are still being performed.
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/group_descendants_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/group_descendants_finder.rb b/app/finders/group_descendants_finder.rb
index f6b938fa732..3b891effd0c 100644
--- a/app/finders/group_descendants_finder.rb
+++ b/app/finders/group_descendants_finder.rb
@@ -38,7 +38,7 @@ class GroupDescendantsFinder
private
def children
- @children ||= subgroups.with_route.includes(:parent) + projects.with_route.includes(:namespace)
+ @children ||= subgroups.with_route.includes(parent: [:route, :parent]) + projects.with_route.includes(namespace: [:route, :parent])
end
def direct_child_groups