lib/flapjack/gateways/jsonapi/check_presenter.rb in flapjack-1.1.0 vs lib/flapjack/gateways/jsonapi/check_presenter.rb in flapjack-1.2.0rc1

- old
+ new

@@ -34,10 +34,10 @@ end def outage(start_time, end_time, options = {}) # hist_states is an array of hashes, with [state, timestamp, summary] keys hist_states = @entity_check.historical_states(start_time, end_time) - return hist_states if hist_states.empty? + return {:outages => []} if hist_states.empty? initial = @entity_check.historical_state_before(hist_states.first[:timestamp]) hist_states.unshift(initial) if initial # TODO the following works, but isn't the neatest