From 8386d69f8f4a75a45e0226f4ad89b7d200c6d84d Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 1 Aug 2017 12:51:14 -0700 Subject: [PATCH] .notifiable_users: compact the passed-in users --- app/services/notification_recipient_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb index 0627cca9214..d412e5414b3 100644 --- a/app/services/notification_recipient_service.rb +++ b/app/services/notification_recipient_service.rb @@ -3,7 +3,7 @@ # module NotificationRecipientService def self.notifiable_users(users, *args) - users.map { |u| NotificationRecipient.new(u, *args) }.select(&:notifiable?).map(&:user) + users.compact.map { |u| NotificationRecipient.new(u, *args) }.select(&:notifiable?).map(&:user) end def self.notifiable?(user, *args)