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,14 +955,18 @@ namespace Ombi.Controllers
// Update it
existingPreference.Value = pref.Value;
existingPreference.Enabled = pref.Enabled;
await _userNotificationPreferences.SaveChangesAsync();
}
await _userNotificationPreferences.Add(new UserNotificationPreferences
else
{
Agent = pref.Agent,
Enabled = pref.Enabled,
UserId = pref.UserId,
Value = pref.Value
});
await _userNotificationPreferences.Add(new UserNotificationPreferences
{
Agent = pref.Agent,
Enabled = pref.Enabled,
UserId = pref.UserId,
Value = pref.Value
});
}
}
return Json(true);