diff options
-rw-r--r-- | .hgtags | 1 | ||||
-rw-r--r-- | debian/changelog | 10 | ||||
-rw-r--r-- | lib/mauve/alert_changed.rb | 17 | ||||
-rw-r--r-- | lib/mauve/version.rb | 2 |
4 files changed, 28 insertions, 2 deletions
@@ -37,3 +37,4 @@ c61f08662f0f36c6e5f4872b805284f8bd0e65c8 3.10.0 7e5e5c45fdc918f0a76e3215572619de1cf07370 3.11.1 3c11022514ff75c885e838ee51e21679c98bb2dd 3.11.2 4aa30e5955fbba88d8240d015f7112090e5a026c 3.11.3 +f70906fadab2c1e172929e99feceea9a255209b6 3.11.4 diff --git a/debian/changelog b/debian/changelog index c9120b2..b50949d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +mauvealert (3.11.4-1) stable; urgency=low + + * AlertGroup is no longer looked for on raise/clear/ack. It is looked up on + notification. + * Update web_interface to use public_folder instead of just public + * Tidied notifier a little. Alert#cached_alert_group is reset before + notification. + + -- Patrick J Cherry <patrick@bytemark.co.uk> Fri, 23 Nov 2012 15:43:11 +0000 + mauvealert (3.11.3-3) stable; urgency=low * dm-aggregates now included. diff --git a/lib/mauve/alert_changed.rb b/lib/mauve/alert_changed.rb index 2e3ac7d..b76df58 100644 --- a/lib/mauve/alert_changed.rb +++ b/lib/mauve/alert_changed.rb @@ -108,7 +108,22 @@ module Mauve # self.remind_at = nil - save + unless self.save + # + # If the save has failed due to validation errors, but there aren't + # actually any errors, just save, by-passing validation. + # + if self.respond_to?("errors") and self.errors.is_a?(DataMapper::Validations::ValidationErrors) and self.errors.errors.empty? + logger.debug "Failed to save #{self.inspect} due to unexplained validation error. Saving again skipping validation." + self.save! + return true + else + logger.warn "Failed to clear #{self.inspect}, due to #{self.errors.inspect} -- this will lead to duplicate reminders." + return false + end + end + + return true end # The time this AlertChanged should next be polled at, or nil. Mimics diff --git a/lib/mauve/version.rb b/lib/mauve/version.rb index 3b443c9..bd0e8cf 100644 --- a/lib/mauve/version.rb +++ b/lib/mauve/version.rb @@ -5,6 +5,6 @@ module Mauve # # Current version - VERSION="3.11.3" + VERSION="3.11.4" end |