diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-02-14 15:11:46 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-09-24 20:15:46 +0200 |
| commit | 13fbfe6091e61450aedc07bc78c96bf4c414bc65 (patch) | |
| tree | 10f5ac5542f30568a3b4b6e84a05768bd0e93eb7 /Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs | |
| parent | 1ebd3c9ac33ab99813307728ad6efbf53a667d4e (diff) | |
Target net6.0
Diffstat (limited to 'Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs')
| -rw-r--r-- | Jellyfin.Api/ModelBinders/NullableEnumModelBinder.cs | 5 |
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 +} |
