mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
fixed denotify
This commit is contained in:
parent
cf78d4758a
commit
519931ee4f
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue