2
0
Эх сурвалжийг харах

Use FirstAsync for device creation

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 11 сар өмнө
parent
commit
dd5f6406a2

+ 2 - 2
Jellyfin.Server.Implementations/Devices/DeviceManager.cs

@@ -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;