Improved error handling.

This commit is contained in:
Martin Edenhofer 2015-09-09 14:31:31 +02:00
parent 659993a14c
commit de3e9049b3

View file

@ -37,7 +37,7 @@ class Stats::TicketLoadMeasure
return result if !result.key?(:used_for_average) return result if !result.key?(:used_for_average)
if result[:total] < 1 if result[:total] < 1 || result[:average_per_agent] == 0.0
result[:state] = 'supergood' result[:state] = 'supergood'
return result return result
end end