From e5854814f654de0cee3f43a5de8ce504c49a5ea3 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 17 Jul 2018 11:07:44 +0200 Subject: [PATCH] Add cross-link to N+1 issue [ci-skip] --- app/models/project.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/project.rb b/app/models/project.rb index 4b57aa0242f..ae0a13b17dc 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2171,6 +2171,7 @@ class Project < ActiveRecord::Base merge_requests = source_of_merge_requests.opened .where(allow_collaboration: true) + # Issue for N+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/49322 Gitlab::GitalyClient.allow_n_plus_1_calls do if branch_name merge_requests.find_by(source_branch: branch_name)&.can_be_merged_by?(user)