From 8887d2bf22971405c300b7cf3ad8d7f4d6269b0e Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 23 Nov 2012 17:35:52 +0000 Subject: Check return value when saving AlertChanged object. --- lib/mauve/alert_changed.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/mauve/alert_changed.rb b/lib/mauve/alert_changed.rb index 2e3ac7d..1712c7e 100644 --- a/lib/mauve/alert_changed.rb +++ b/lib/mauve/alert_changed.rb @@ -108,7 +108,13 @@ module Mauve # self.remind_at = nil - save + if self.save + logger.debug "Successfully cleared #{self}" + true + else + logger.warn "Failed to clear #{self} -- this will lead to duplicate reminders." + false + end end # The time this AlertChanged should next be polled at, or nil. Mimics -- cgit v1.2.1