aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve')
-rw-r--r--lib/mauve/alert.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb
index cbf4a40..82f9e91 100644
--- a/lib/mauve/alert.rb
+++ b/lib/mauve/alert.rb
@@ -209,11 +209,6 @@ module Mauve
def detail; super || "_No detail set._" ; end
#
- # The update type
- #
- def update_type; super || "cleared" ; end
-
- #
# Set the subject -- this clears the cached_alert_group.
#
def subject=(s)
@@ -338,10 +333,7 @@ module Mauve
history = nil
- if ut.nil?
- self.update_type = "cleared" if self.new? or self.update_type.nil?
-
- else
+ unless ut.nil?
self.update_type = ut
history = History.new(:alerts => [self], :type => "update")
@@ -364,6 +356,11 @@ module Mauve
end
end
+ #
+ # Make sure the update type is always set.
+ #
+ self.update_type = "cleared" if self.update_type.nil?
+
self.raise_on_save_failure = true
begin