This commit is contained in:
tidusjar 2020-10-06 11:32:07 +01:00
commit 4c14825439
3 changed files with 3 additions and 3 deletions

View file

@ -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())

View file

@ -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())

View file

@ -191,7 +191,7 @@ namespace Ombi.Notifications
protected IQueryable<OmbiUser> 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);
}