diff options
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 9f4f4923e58..4571d7f0ee1 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -84,11 +84,11 @@ class Issue < ActiveRecord::Base end def referenced_merge_requests - references = [self, *notes].flat_map do |note| - note.all_references(load_lazy_references: false).merge_requests - end.uniq - - Banzai::LazyReference.load(references).uniq.sort_by(&:iid) + Gitlab::ReferenceExtractor.lazily do + [self, *notes].flat_map do |note| + note.all_references(load_lazy_references: false).merge_requests + end + end.sort_by(&:iid) end # Reset issue events cache |