diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mauve/alert_group.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mauve/alert_group.rb b/lib/mauve/alert_group.rb index 424ba88..fe17516 100644 --- a/lib/mauve/alert_group.rb +++ b/lib/mauve/alert_group.rb @@ -236,16 +236,19 @@ module Mauve # OK got the next reminder time. # unless remind_at.nil? + # + # Find the last reminder, if available for the same alert, update type, and person. + # this_reminder = AlertChanged.first_or_new( :alert_id => alert.id, :person => self.name, + :update_type => alert.update_type, :remind_at.not => nil, :remind_at.gt => at ) this_reminder.level = level.to_s this_reminder.at = at - this_reminder.update_type = alert.update_type this_reminder.remind_at = remind_at this_reminder.was_relevant = true this_reminder.save |