summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-02-12 18:20:42 +0100
committerAndreas Brandl <abrandl@gitlab.com>2018-02-13 18:04:52 +0100
commitc11e80699783ca2915a59c69f234d8d3aff256d8 (patch)
treeea9ba2121540a05f9c3b4f646407534d73dd1a44
parent95738d4b75a132210eb1d7c9ac7d35e4ea4a86bd (diff)
downloadgitlab-ce-c11e80699783ca2915a59c69f234d8d3aff256d8.tar.gz
Always eagerly load a note's author.
-rw-r--r--app/finders/notes_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb
index 12157818bcd..33ee1e975b9 100644
--- a/app/finders/notes_finder.rb
+++ b/app/finders/notes_finder.rb
@@ -57,7 +57,7 @@ class NotesFinder
types = %w(commit issue merge_request snippet)
note_relations = types.map { |t| notes_for_type(t) }
note_relations.map! { |notes| search(notes) }
- UnionFinder.new.find_union(note_relations, Note)
+ UnionFinder.new.find_union(note_relations, Note.includes(:author))
end
def noteables_for_type(noteable_type)