Commit 95738d4b authored by Andreas Brandl's avatar Andreas Brandl

Always eagerly load an issue's author.

Rather radical but avoids n+1 queries in the rather common case we want
to include information about the author.
parent 4f3d7532
...@@ -21,7 +21,7 @@ class IssuesFinder < IssuableFinder ...@@ -21,7 +21,7 @@ class IssuesFinder < IssuableFinder
CONFIDENTIAL_ACCESS_LEVEL = Gitlab::Access::REPORTER CONFIDENTIAL_ACCESS_LEVEL = Gitlab::Access::REPORTER
def klass def klass
Issue Issue.includes(:author)
end end
def with_confidentiality_access_check def with_confidentiality_access_check
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment