From b30541335175f36c4892ebe6938b26d20b9c0d50 Mon Sep 17 00:00:00 2001 From: TidusJar Date: Tue, 8 Jan 2019 12:56:32 +0000 Subject: [PATCH] Fixed #2725 and #2721 --- src/Ombi.Notifications/NotificationMessageCurlys.cs | 6 +++--- src/Ombi/Controllers/IdentityController.cs | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Ombi.Notifications/NotificationMessageCurlys.cs b/src/Ombi.Notifications/NotificationMessageCurlys.cs index 407490240..cedda3735 100644 --- a/src/Ombi.Notifications/NotificationMessageCurlys.cs +++ b/src/Ombi.Notifications/NotificationMessageCurlys.cs @@ -39,7 +39,7 @@ namespace Ombi.Notifications Alias = (req?.RequestedUser?.Alias.HasValue() ?? false) ? req?.RequestedUser?.Alias : req?.RequestedUser?.UserName; if (pref != null) { - UserPreference = pref.Enabled ? pref.Value : Alias; + UserPreference = pref.Value.HasValue() ? pref.Value : Alias; } Title = title; RequestedDate = req?.RequestedDate.ToString("D"); @@ -91,7 +91,7 @@ namespace Ombi.Notifications Alias = (req?.RequestedUser?.Alias.HasValue() ?? false) ? req?.RequestedUser?.Alias : req?.RequestedUser?.UserName; if (pref != null) { - UserPreference = pref.Enabled ? pref.Value : Alias; + UserPreference = pref.Value.HasValue() ? pref.Value : Alias; } Title = title; RequestedDate = req?.RequestedDate.ToString("D"); @@ -136,7 +136,7 @@ namespace Ombi.Notifications Alias = (req?.RequestedUser?.Alias.HasValue() ?? false) ? req?.RequestedUser?.Alias : req?.RequestedUser?.UserName; if (pref != null) { - UserPreference = pref.Enabled ? pref.Value : Alias; + UserPreference = pref.Value.HasValue() ? pref.Value : Alias; } Title = title; RequestedDate = req?.RequestedDate.ToString("D"); diff --git a/src/Ombi/Controllers/IdentityController.cs b/src/Ombi/Controllers/IdentityController.cs index ec884ace6..2976069ed 100644 --- a/src/Ombi/Controllers/IdentityController.cs +++ b/src/Ombi/Controllers/IdentityController.cs @@ -965,7 +965,6 @@ namespace Ombi.Controllers { // Update it existingPreference.Value = pref.Value; - existingPreference.Enabled = pref.Enabled; await _userNotificationPreferences.SaveChangesAsync(); } else @@ -973,7 +972,6 @@ namespace Ombi.Controllers await _userNotificationPreferences.Add(new UserNotificationPreferences { Agent = pref.Agent, - Enabled = pref.Enabled, UserId = pref.UserId, Value = pref.Value });