mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:39:53 +01:00
Prevent error when no one is subscribed
This commit is contained in:
parent
b93058b11d
commit
9c4b2e452a
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ class Subscription < ApplicationRecord
|
|||
{ target_id: source.id, target_type: Comment, recipient_id: s.user_id, new: true, type: Notification::Commented }
|
||||
end
|
||||
|
||||
Notification.insert_all!(notifications) # rubocop:disable Rails/SkipsModelValidations
|
||||
Notification.insert_all!(notifications) unless notifications.empty? # rubocop:disable Rails/SkipsModelValidations
|
||||
end
|
||||
|
||||
def denotify(source, target)
|
||||
|
|
Loading…
Reference in a new issue