Commit c11e8069 authored by Andreas Brandl's avatar Andreas Brandl

Always eagerly load a note's author.

parent 95738d4b
...@@ -57,7 +57,7 @@ class NotesFinder ...@@ -57,7 +57,7 @@ class NotesFinder
types = %w(commit issue merge_request snippet) types = %w(commit issue merge_request snippet)
note_relations = types.map { |t| notes_for_type(t) } note_relations = types.map { |t| notes_for_type(t) }
note_relations.map! { |notes| search(notes) } note_relations.map! { |notes| search(notes) }
UnionFinder.new.find_union(note_relations, Note) UnionFinder.new.find_union(note_relations, Note.includes(:author))
end end
def noteables_for_type(noteable_type) def noteables_for_type(noteable_type)
......
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