mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Use FirstAsync for device creation
Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
79c0a7d7f0
commit
dd5f6406a2
1 changed files with 2 additions and 2 deletions
|
|
@ -100,9 +100,9 @@ namespace Jellyfin.Server.Implementations.Devices
|
|||
|
||||
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
var newDevice = await dbContext.Devices
|
||||
.FirstOrDefaultAsync(d => d.Id == device.Id)
|
||||
.FirstAsync(d => d.Id == device.Id)
|
||||
.ConfigureAwait(false);
|
||||
_devices.TryAdd(device.Id, newDevice!);
|
||||
_devices.TryAdd(device.Id, newDevice);
|
||||
}
|
||||
|
||||
return device;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue