Commit 2380e80a authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Add cross-link to N+1 issue

parent d5c37a9ae438
......@@ -2171,6 +2171,7 @@ def fetch_branch_allows_collaboration?(user, branch_name)
merge_requests = source_of_merge_requests.opened
.where(allow_collaboration: true)
# Issue for N+1:
Gitlab::GitalyClient.allow_n_plus_1_calls do
if branch_name
merge_requests.find_by(source_branch: branch_name)&.can_be_merged_by?(user)
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