From ada66c90b081076579d28a9b1d3ec2767c63701f Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 1 May 2013 09:53:15 +0100 Subject: Allow alert to clear raised_at/cleared_at times if none specified --- lib/mauve/alert.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb index a2033a5..e6d1bae 100644 --- a/lib/mauve/alert.rb +++ b/lib/mauve/alert.rb @@ -850,6 +850,11 @@ module Mauve alert_db.raised_at = nil alert_db.will_raise_at = raise_time end + else + # + # If no raise time has been set, then update the database to reflect this. + # + alert_db.raised_at = alert_db.will_raise_at = nil end if clear_time @@ -863,6 +868,11 @@ module Mauve alert_db.cleared_at = nil alert_db.will_clear_at = clear_time end + else + # + # If no clear time has been set, then update the database to reflect this. + # + alert_db.cleared_at = alert_db.will_clear_at = nil end # -- cgit v1.2.1