diff options
author | Robert Speicher <robert@gitlab.com> | 2015-12-21 20:54:45 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-12-21 20:55:04 +0300 |
commit | 8eb895eeb2102b83b335ee61844bff9bf0194cf5 (patch) | |
tree | 08255684c907af181520ae32ee481c3c8e971f53 | |
parent | 525981fcfe25954391f338ca57ef60771a9ac4fe (diff) |
Merge branch 'fix-issue-related-mrs' into 'master'
Fix issue related cross-project MRs
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4188
See merge request !2163
-rw-r--r-- | app/models/concerns/participable.rb | 2 | ||||
-rw-r--r-- | app/models/issue.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/participable.rb b/app/models/concerns/participable.rb index 808d80b0530..fc6f83b918b 100644 --- a/app/models/concerns/participable.rb +++ b/app/models/concerns/participable.rb @@ -37,7 +37,7 @@ module Participable # 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 - def participants(current_user = self.author, load_lazy_references: true) + def participants(current_user = self.author) participants = Gitlab::ReferenceExtractor.lazily do self.class.participant_attrs.flat_map do |attr| diff --git a/app/models/issue.rb b/app/models/issue.rb index 4571d7f0ee1..80ecd15077f 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -86,7 +86,7 @@ class Issue < ActiveRecord::Base def referenced_merge_requests Gitlab::ReferenceExtractor.lazily do [self, *notes].flat_map do |note| - note.all_references(load_lazy_references: false).merge_requests + note.all_references.merge_requests end end.sort_by(&:iid) end |