1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Set Id property on existing devices so we don't try to create a new one instead of updating existing. (#2420)

This commit is contained in:
Todd Martin
2022-11-18 10:22:07 -05:00
committed by GitHub
parent 3bece3c3ad
commit 02e4b10ae8

View File

@ -562,6 +562,10 @@ public abstract class BaseRequestValidator<T> where T : class
}
}
}
else
{
deviceFromRequest.Id = existingDevice.Id;
}
deviceFromRequest.UserId = user.Id;
await _deviceService.SaveAsync(deviceFromRequest);