aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/GenresController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Controllers/GenresController.cs')
-rw-r--r--Jellyfin.Api/Controllers/GenresController.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/GenresController.cs b/Jellyfin.Api/Controllers/GenresController.cs
index eb03b514c..da60f2c60 100644
--- a/Jellyfin.Api/Controllers/GenresController.cs
+++ b/Jellyfin.Api/Controllers/GenresController.cs
@@ -172,12 +172,9 @@ public class GenresController : BaseJellyfinApiController
item ??= new Genre();
- if (userId.Value.Equals(default))
- {
- return _dtoService.GetBaseItemDto(item, dtoOptions);
- }
-
- var user = _userManager.GetUserById(userId.Value);
+ var user = userId.Value.Equals(default)
+ ? null
+ : _userManager.GetUserById(userId.Value);
return _dtoService.GetBaseItemDto(item, dtoOptions, user);
}