Skip denotify if recipient doesn't exist
This commit is contained in:
parent
d9f82c4985
commit
8005fc8ae6
|
@ -26,6 +26,7 @@ class Notification < ApplicationRecord
|
|||
end
|
||||
|
||||
def denotify(recipient, target)
|
||||
return nil if recipient.blank?
|
||||
return nil unless target.respond_to? :notification_type
|
||||
|
||||
notif_type = target.notification_type
|
||||
|
|
Loading…
Reference in New Issue