diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-04 13:12:23 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-04 13:12:23 +0300 |
commit | 0b4f9ff4068af6776b495d9332aeecf58e48786f (patch) | |
tree | 5360634832d137d4f665c5f015ccbf18b6d6f704 /lib | |
parent | c63cd738b1eed64565cfa8213799c75b5371f994 (diff) | |
parent | bd4bfcc6411e4819c0c67717095bb2e54e7bb6df (diff) |
Merge branch 'sh-fix-source-project-nplus-one' into 'master'
Fix N+1 with source_projects in merge requests API
See merge request gitlab-org/gitlab-ce!19346
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/merge_requests.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index b1e510d72de..278d53427f0 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -38,7 +38,7 @@ module API merge_requests = MergeRequestsFinder.new(current_user, args).execute .reorder(args[:order_by] => args[:sort]) merge_requests = paginate(merge_requests) - .preload(:target_project) + .preload(:source_project, :target_project) return merge_requests if args[:view] == 'simple' |