mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-26 18:31:14 +00:00
Preload journal's user (#6375).
git-svn-id: http://svn.redmine.org/redmine/trunk@16377 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8ae81b98d5
commit
29ad5b31e0
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user