Query User on device creation

Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
gnattu 2024-06-01 08:22:00 +08:00
parent 5a62c7a146
commit d235378133

View File

@ -100,10 +100,13 @@ namespace Jellyfin.Server.Implementations.Devices
dbContext.Devices.Add(device);
await dbContext.SaveChangesAsync().ConfigureAwait(false);
var newDevice = await dbContext.Devices
.Include(d => d.User)
.FirstOrDefaultAsync(d => d.Id == device.Id)
.ConfigureAwait(false);
_devices.Add(device.Id, newDevice!);
}
_devices.Add(device.Id, device);
return device;
}