Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-02-06 15:20:42 +0300
committerAndreas Brandl <abrandl@gitlab.com>2018-02-07 02:22:13 +0300
commitf7c30ae30d878de3980f65a2c3353503a440a615 (patch)
tree0b6b6b1fd7393aa3d7cb940796c783a9f6613100 /app/finders
parentb9d547b12c3731160c456f3f20366e600ab99484 (diff)
Fix N+1 query problem for snippets dashboard.
Closes #40755.
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/snippets_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/snippets_finder.rb b/app/finders/snippets_finder.rb
index c04f61de79c..4450766485f 100644
--- a/app/finders/snippets_finder.rb
+++ b/app/finders/snippets_finder.rb
@@ -28,7 +28,7 @@ class SnippetsFinder < UnionFinder
segments << items.public_to_user(current_user)
segments << authorized_to_user(items) if current_user
- find_union(segments, Snippet)
+ find_union(segments, Snippet.includes(:author))
end
def authorized_to_user(items)