aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/ModelBinders
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/ModelBinders')
-rw-r--r--Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs b/Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs
index be2045fba..d2e78ac88 100644
--- a/Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs
+++ b/Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs
@@ -32,7 +32,8 @@ namespace Jellyfin.Api.ModelBinders
{
try
{
- var convertedValue = converter.ConvertFromString(valueProviderResult.FirstValue);
+ // REVIEW: This shouldn't be null here
+ var convertedValue = converter.ConvertFromString(valueProviderResult.FirstValue!);
bindingContext.Result = ModelBindingResult.Success(convertedValue);
}
catch (FormatException e)
@@ -44,4 +45,4 @@ namespace Jellyfin.Api.ModelBinders
return Task.CompletedTask;
}
}
-} \ No newline at end of file
+}