diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-23 17:35:52 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-23 17:35:52 +0000 |
commit | 8887d2bf22971405c300b7cf3ad8d7f4d6269b0e (patch) | |
tree | aee91c643e3b6fb74ac66b57a13ec61d86650a47 | |
parent | 3003a2a4d35e1e349e8a3882af2fc015ca9b0830 (diff) |
Check return value when saving AlertChanged object.
-rw-r--r-- | lib/mauve/alert_changed.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |