fixed denotify

This commit is contained in:
nilsding 2014-12-14 15:48:10 +01:00
parent cf78d4758a
commit 519931ee4f

View file

@ -22,7 +22,8 @@ class Notification < ActiveRecord::Base
notif_type = target.notification_type
return nil unless notif_type
notif_type.find_by(recipient: recipient, target: target).destroy
notif = notif_type.find_by(recipient: recipient, target: target)
notif.destroy unless notif.nil?
end
private