Commit b992f422 authored by jplang's avatar jplang

Preload journal's user (#6375).

git-svn-id: https://svn.redmine.org/redmine/trunk@16377 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 7c05014f
......@@ -1160,7 +1160,7 @@ class Issue < ActiveRecord::Base
group(:journalized_id).
maximum(:id).
values
journals = Journal.where(:id => journal_ids).to_a
journals = Journal.where(:id => journal_ids).preload(:user).to_a
issues.each do |issue|
journal = journals.detect {|j| j.journalized_id == issue.id}
......
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