diff options
Diffstat (limited to 'lib/mauve/person.rb')
-rw-r--r-- | lib/mauve/person.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mauve/person.rb b/lib/mauve/person.rb index c1c12c6..6178fa0 100644 --- a/lib/mauve/person.rb +++ b/lib/mauve/person.rb @@ -205,7 +205,7 @@ module Mauve # Log the result note = "#{@alert.update_type.capitalize} #{name} notification to #{@person.username} (#{destination}) " + (res ? "succeeded" : "failed" ) logger.info note+" about #{@alert}." - h = History.new(:alerts => [@alert], :type => "notification", :event => note) + h = History.new(:alerts => [@alert], :type => "notification", :event => note, :user => @person.username) logger.error "Unable to save history due to #{h.errors.inspect}" if !h.save return res @@ -234,7 +234,7 @@ module Mauve if @suppressed or self.is_on_holiday?(now) or self.is_off_sick?(now) note = "#{alert.update_type.capitalize} notification to #{self.username} suppressed" logger.info note + " about #{alert}." - History.create(:alerts => [alert], :type => "notification", :event => note) + History.create(:alerts => [alert], :type => "notification", :event => note, :user => self.username) return true end |