mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Fixed a small error in the Mobile Notification Provider
This commit is contained in:
parent
209b7cf50b
commit
880aea1221
1 changed files with 2 additions and 2 deletions
|
@ -264,13 +264,13 @@ namespace Ombi.Notifications.Agents
|
||||||
? MovieRequest?.RequestedUser?.NotificationUserIds
|
? MovieRequest?.RequestedUser?.NotificationUserIds
|
||||||
: TvRequest?.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);
|
var user= _userManager.Users.Include(x => x.NotificationUserIds).FirstOrDefault(x => x.Id == model.UserId);
|
||||||
notificationIds = user.NotificationUserIds;
|
notificationIds = user.NotificationUserIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!notificationIds.Any())
|
if (!notificationIds?.Any() ?? true)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(
|
_logger.LogInformation(
|
||||||
$"there are no admins to send a notification for {type}, for agent {NotificationAgent.Mobile}");
|
$"there are no admins to send a notification for {type}, for agent {NotificationAgent.Mobile}");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue