pull/2728/head
TidusJar 6 years ago
parent cdab76da40
commit b305413351

@ -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");

@ -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
});

Loading…
Cancel
Save