mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Use FirstAsync for device creation
Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
79c0a7d7f0
commit
dd5f6406a2
@ -100,9 +100,9 @@ namespace Jellyfin.Server.Implementations.Devices
|
|||||||
|
|
||||||
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||||
var newDevice = await dbContext.Devices
|
var newDevice = await dbContext.Devices
|
||||||
.FirstOrDefaultAsync(d => d.Id == device.Id)
|
.FirstAsync(d => d.Id == device.Id)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
_devices.TryAdd(device.Id, newDevice!);
|
_devices.TryAdd(device.Id, newDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user