summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 2062e58e8..c0cdac86e 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -220,8 +220,8 @@ class Issue < ActiveRecord::Base
# Set the done_ratio using the status if that setting is set. This will keep the done_ratios
# even if the user turns off the setting later
def update_done_ratio_from_issue_status
- if Issue.use_status_for_done_ratio? && !self.status.default_done_ratio.blank?
- self.done_ratio = self.status.default_done_ratio
+ if Issue.use_status_for_done_ratio? && status && status.default_done_ratio?
+ self.done_ratio = status.default_done_ratio
end
end