From 4c14825439e38a0b32621ae0f4b632894c43ce7d Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 6 Oct 2020 11:32:07 +0100 Subject: [PATCH] Fixed #3786 --- src/Ombi.Notifications/Agents/LegacyMobileNotification.cs | 2 +- src/Ombi.Notifications/Agents/MobileNotification.cs | 2 +- src/Ombi.Notifications/BaseNotification.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs b/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs index 78fdc6304..5ac92d5bf 100644 --- a/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs +++ b/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs @@ -306,7 +306,7 @@ namespace Ombi.Notifications.Agents { if (await SubsribedUsers.AnyAsync()) { - foreach (var user in SubsribedUsers.Include(x => x.NotificationUserIds)) + foreach (var user in SubsribedUsers) { var notificationId = user.NotificationUserIds; if (notificationId.Any()) diff --git a/src/Ombi.Notifications/Agents/MobileNotification.cs b/src/Ombi.Notifications/Agents/MobileNotification.cs index 3ac2bd7fe..61526802c 100644 --- a/src/Ombi.Notifications/Agents/MobileNotification.cs +++ b/src/Ombi.Notifications/Agents/MobileNotification.cs @@ -336,7 +336,7 @@ namespace Ombi.Notifications.Agents { if (await SubsribedUsers.AnyAsync()) { - foreach (var user in SubsribedUsers.Include(x => x.NotificationUserIds)) + foreach (var user in SubsribedUsers) { var notificationId = user.NotificationUserIds; if (notificationId.Any()) diff --git a/src/Ombi.Notifications/BaseNotification.cs b/src/Ombi.Notifications/BaseNotification.cs index c9404eb2c..465ccd22c 100644 --- a/src/Ombi.Notifications/BaseNotification.cs +++ b/src/Ombi.Notifications/BaseNotification.cs @@ -191,7 +191,7 @@ namespace Ombi.Notifications protected IQueryable GetSubscriptions(int requestId, RequestType type) { - var subs = RequestSubscription.GetAll().Include(x => x.User).Where(x => x.RequestId == requestId && type == x.RequestType); + var subs = RequestSubscription.GetAll().Include(x => x.User).ThenInclude(x => x.NotificationUserIds).Where(x => x.RequestId == requestId && type == x.RequestType); return subs.Select(x => x.User); }