check for NaN

Signed-off-by: Florian Kraft <f.kraft@finn.de>
pull/6827/head
Florian Kraft 10 years ago
parent 1e78d8622e
commit b9be941cde
  1. 4
      app/models/burndown.rb

@ -107,8 +107,8 @@ class Burndown
def determine_max
@max = {
:points => @available_series.values.select{|s| s.unit == :points}.flatten.compact.max || 0.0,
:hours => @available_series.values.select{|s| s.unit == :hours}.flatten.compact.max || 0.0
:points => @available_series.values.select{|s| s.unit == :points}.flatten.compact.reject(&:nan?).max || 0.0,
:hours => @available_series.values.select{|s| s.unit == :hours}.flatten.compact.reject(&:nan?).max || 0.0
}
end

Loading…
Cancel
Save