From 880aea1221ace3fa637a79c92534ed55e541265e Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Wed, 27 Jun 2018 08:50:58 +0100 Subject: [PATCH] Fixed a small error in the Mobile Notification Provider --- src/Ombi.Notifications/Agents/MobileNotification.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Notifications/Agents/MobileNotification.cs b/src/Ombi.Notifications/Agents/MobileNotification.cs index 35619ad1f..bfb7dcd88 100644 --- a/src/Ombi.Notifications/Agents/MobileNotification.cs +++ b/src/Ombi.Notifications/Agents/MobileNotification.cs @@ -264,13 +264,13 @@ namespace Ombi.Notifications.Agents ? MovieRequest?.RequestedUser?.NotificationUserIds : TvRequest?.RequestedUser?.NotificationUserIds; } - if (model.UserId.HasValue() && !notificationIds.Any()) + if (model.UserId.HasValue() && (!notificationIds?.Any() ?? true)) { var user= _userManager.Users.Include(x => x.NotificationUserIds).FirstOrDefault(x => x.Id == model.UserId); notificationIds = user.NotificationUserIds; } - if (!notificationIds.Any()) + if (!notificationIds?.Any() ?? true) { _logger.LogInformation( $"there are no admins to send a notification for {type}, for agent {NotificationAgent.Mobile}");