Fixed a bug with the notification preferences !wip

This commit is contained in:
Jamie 2018-09-20 21:44:30 +01:00
commit 550028b9eb

View file

@ -955,7 +955,10 @@ namespace Ombi.Controllers
// Update it
existingPreference.Value = pref.Value;
existingPreference.Enabled = pref.Enabled;
await _userNotificationPreferences.SaveChangesAsync();
}
else
{
await _userNotificationPreferences.Add(new UserNotificationPreferences
{
Agent = pref.Agent,
@ -963,6 +966,7 @@ namespace Ombi.Controllers
UserId = pref.UserId,
Value = pref.Value
});
}
}
return Json(true);