diff options
Diffstat (limited to 'app/services/notification_recipient_service.rb')
-rw-r--r-- | app/services/notification_recipient_service.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb index ed070cfaa54..b82d9c64296 100644 --- a/app/services/notification_recipient_service.rb +++ b/app/services/notification_recipient_service.rb @@ -51,11 +51,10 @@ module NotificationRecipientService def add_recipients(users, type, reason) if users.is_a?(ActiveRecord::Relation) - users = users.includes(:notification_settings).to_a + users = users.includes(:notification_settings) end - users = Array(users) - users.compact! + users = Array(users).compact recipients.concat(users.map { |u| make_recipient(u, type, reason) }) end |