Skip to content

Commit

Permalink
Backport pull request jellyfin#11633 from jellyfin/release-10.9.z
Browse files Browse the repository at this point in the history
Allow empty user id when getting device list

Original-merge: a5d60c4

Merged-by: crobibero <[email protected]>

Backported-by: Joshua M. Boniface <[email protected]>
  • Loading branch information
crobibero authored and joshuaboniface committed May 17, 2024
1 parent 9b97857 commit 77c3ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Jellyfin.Server.Implementations/Devices/DeviceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public async Task<QueryResult<DeviceInfo>> GetDevicesForUser(Guid? userId)
.SelectMany(d => dbContext.DeviceOptions.Where(o => o.DeviceId == d.DeviceId).DefaultIfEmpty(), (d, o) => new { Device = d, Options = o })
.AsAsyncEnumerable();

if (userId.HasValue)
if (!userId.IsNullOrEmpty())
{
var user = _userManager.GetUserById(userId.Value);
if (user is null)
Expand Down

0 comments on commit 77c3ddc

Please sign in to comment.