Commit 5ef2048f authored by Douwe Maan's avatar Douwe Maan

Fix issue related cross-project MRs

parent 4b4cbf0c
...@@ -37,7 +37,7 @@ module Participable ...@@ -37,7 +37,7 @@ module Participable
# Be aware that this method makes a lot of sql queries. # Be aware that this method makes a lot of sql queries.
# Save result into variable if you are going to reuse it inside same request # Save result into variable if you are going to reuse it inside same request
def participants(current_user = self.author, load_lazy_references: true) def participants(current_user = self.author)
participants = participants =
Gitlab::ReferenceExtractor.lazily do Gitlab::ReferenceExtractor.lazily do
self.class.participant_attrs.flat_map do |attr| self.class.participant_attrs.flat_map do |attr|
......
...@@ -86,7 +86,7 @@ class Issue < ActiveRecord::Base ...@@ -86,7 +86,7 @@ class Issue < ActiveRecord::Base
def referenced_merge_requests def referenced_merge_requests
Gitlab::ReferenceExtractor.lazily do Gitlab::ReferenceExtractor.lazily do
[self, *notes].flat_map do |note| [self, *notes].flat_map do |note|
note.all_references(load_lazy_references: false).merge_requests note.all_references.merge_requests
end end
end.sort_by(&:iid) end.sort_by(&:iid)
end end
......
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