aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:47:00 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:47:00 +0100
commit3576923edf788eecb4320e034f5afaaf625bd62e (patch)
tree9c3593ae713a7cec39d0886ee0988c39737cf41f /lib/mauve
parent42f14de6ab50d0e05f49f038e40b94b686701bf1 (diff)
Missed from last commit
Diffstat (limited to 'lib/mauve')
-rw-r--r--lib/mauve/alert_changed.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/mauve/alert_changed.rb b/lib/mauve/alert_changed.rb
index 4668fd7..68a0a00 100644
--- a/lib/mauve/alert_changed.rb
+++ b/lib/mauve/alert_changed.rb
@@ -52,10 +52,6 @@ module Mauve
Log4r::Logger.new self.class.to_s
end
-## def initialize
-# logger = Log4r::Logger.new self.class.to_s
-# end
-
## Checks to see if a raise was send to the person.
#
# @TODO: Recurence is broken in ruby, change this so that it does not
@@ -100,14 +96,20 @@ module Mauve
save
else
saved = false
-
- alert_group.notifications.each do |notification|
- notification.people.each do |person|
- if person.username == self.person
- person.remind(alert, level)
- self.remind_at = notification.remind_at_next(alert)
- save
- saved = true
+
+ unless alert_group.notifications.nil?
+
+ alert_group.notifications.each do |notification|
+ notification.people.each do |person|
+ # Not interested in nil people.
+ next if person.nil?
+
+ if person.username == self.person
+ person.remind(alert, level)
+ self.remind_at = notification.remind_at_next(alert)
+ save
+ saved = true
+ end
end
end
end