aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2013-05-01 09:53:15 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2013-05-01 09:53:15 +0100
commitada66c90b081076579d28a9b1d3ec2767c63701f (patch)
treedb7f4ee7220d29fc80a3cf6bc9e5c7ab02a16cdb /lib
parent89656dc39f470e3a8b1c204f5932b3b5c439a871 (diff)
Allow alert to clear raised_at/cleared_at times if none specified
Diffstat (limited to 'lib')
-rw-r--r--lib/mauve/alert.rb10
1 files changed, 10 insertions, 0 deletions
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
#