Fixed the issue where you couldn't remove a legacy user from the notifications

pull/4185/head v4.0.1351
tidusjar 3 years ago
parent 4071b2e8a2
commit 50af2b8482

@ -92,7 +92,7 @@ namespace Ombi.Controllers.V1
[Admin]
public async Task<bool> RemoveUser([FromBody] RemoveUserModel userId)
{
var user = await _userManager.Users.Include(x => x.NotificationUserIds).FirstOrDefaultAsync(x => x.Id.Equals(userId.UserId, StringComparison.InvariantCultureIgnoreCase));
var user = await _userManager.Users.Include(x => x.NotificationUserIds).FirstOrDefaultAsync(x => x.Id == userId.UserId);
try
{
await _notification.DeleteRange(user.NotificationUserIds);

Loading…
Cancel
Save