mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Query User on device creation
Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
5a62c7a146
commit
d235378133
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue