mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-24 09:21:12 +00:00
Load only last journal with notes (#1474).
git-svn-id: http://svn.redmine.org/redmine/trunk@16370 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
9d8209fddc
commit
7a60e44d43
@ -1083,8 +1083,7 @@ class Issue < ActiveRecord::Base
|
||||
if @last_notes
|
||||
@last_notes
|
||||
else
|
||||
notes = self.journals.visible.where.not(notes: '').to_a
|
||||
notes.last.notes unless notes.empty?
|
||||
journals.where.not(notes: '').reorder(:id => :desc).first.try(:notes)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user