aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-09-25 19:21:37 +0200
committerGitHub <noreply@github.com>2021-09-25 19:21:37 +0200
commit2ee3e9e00f62ff8b0139f1273d7666d0f6c549a4 (patch)
tree354f808d6687abcd3b5f862c0cb8c9e4fd754966 /Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs
parentd81c9a7a8cbab8967bfc66086c6f0f80bf7fc0c2 (diff)
parent4643fd5dcbc6d1a4fbe973efc68d92ca71e3ab3b (diff)
Merge pull request #6590 from jellyfin/dotnet6
Diffstat (limited to 'Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs')
-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
+}