Skip to content

Commit

Permalink
Allow empty user id when getting device list (jellyfin#11633)
Browse files Browse the repository at this point in the history
  • Loading branch information
crobibero authored May 15, 2024
1 parent 2cb052a commit a5d60c4
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 a5d60c4

Please sign in to comment.