Issue#done_ratio should not break if status is nil.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3159 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
008f35277e
commit
1f47d5856e
|
@ -166,8 +166,8 @@ class Issue < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def done_ratio
|
||||
if Issue.use_status_for_done_ratio? && !self.status.default_done_ratio.blank?
|
||||
self.status.default_done_ratio
|
||||
if Issue.use_status_for_done_ratio? && status && status.default_done_ratio?
|
||||
status.default_done_ratio
|
||||
else
|
||||
read_attribute(:done_ratio)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue