diff options
author | Robert Speicher <robert@gitlab.com> | 2015-12-21 17:54:45 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-12-21 17:54:45 +0000 |
commit | 12b6bf5c57588b011fd711023bf48eeabea02793 (patch) | |
tree | a3d54591a83273710338f5a47c1904c4bf17d353 | |
parent | 9570495e75f90d1011531753dd41f0c06e8fcf99 (diff) | |
parent | 5ef2048f65da62999732876ea7efa00bc942ba78 (diff) | |
download | gitlab-ce-12b6bf5c57588b011fd711023bf48eeabea02793.tar.gz |
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 |