summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-05-31 12:27:41 +0000
committerNick Thomas <nick@gitlab.com>2018-05-31 12:27:41 +0000
commit2fdd8982f8204340e6413a57f46e6c41d8ecb429 (patch)
treee59052d88a15cf9ba7f6f77518223ab180a44be0 /lib
parenta53a0487aeed592509e76bfeb7146b5825edcc47 (diff)
parentef253a1ee7c03edf9773574a843b5c458e9add36 (diff)
downloadgitlab-ce-2fdd8982f8204340e6413a57f46e6c41d8ecb429.tar.gz
Merge branch 'sh-fix-issue-api-perf-n-plus-one' into 'master'
Eliminate cached N+1 queries for projects in Issue API See merge request gitlab-org/gitlab-ce!19269
Diffstat (limited to 'lib')
-rw-r--r--lib/api/issues.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index 6d75e8817c4..b64f465ce56 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -16,7 +16,7 @@ module API
args[:scope] = args[:scope].underscore if args[:scope]
issues = IssuesFinder.new(current_user, args).execute
- .preload(:assignees, :labels, :notes, :timelogs)
+ .preload(:assignees, :labels, :notes, :timelogs, :project)
issues.reorder(args[:order_by] => args[:sort])
end