瀏覽代碼

Allow empty user id when getting device list (#11633)

Cody Robibero 1 年之前
父節點
當前提交
a5d60c4521
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Jellyfin.Server.Implementations/Devices/DeviceManager.cs

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

@@ -179,7 +179,7 @@ namespace Jellyfin.Server.Implementations.Devices
                     .SelectMany(d => dbContext.DeviceOptions.Where(o => o.DeviceId == d.DeviceId).DefaultIfEmpty(), (d, o) => new { Device = d, Options = o })
                     .SelectMany(d => dbContext.DeviceOptions.Where(o => o.DeviceId == d.DeviceId).DefaultIfEmpty(), (d, o) => new { Device = d, Options = o })
                     .AsAsyncEnumerable();
                     .AsAsyncEnumerable();
 
 
-                if (userId.HasValue)
+                if (!userId.IsNullOrEmpty())
                 {
                 {
                     var user = _userManager.GetUserById(userId.Value);
                     var user = _userManager.GetUserById(userId.Value);
                     if (user is null)
                     if (user is null)