Fixed: Correct Attribute compare for Id validation

This commit is contained in:
Qstick 2022-11-30 22:09:18 -06:00
parent 8105da33d8
commit 7e48ea0231
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ namespace Sonarr.Http.REST
} }
var attributes = descriptor.MethodInfo.CustomAttributes; var attributes = descriptor.MethodInfo.CustomAttributes;
if (attributes.Any(x => VALIDATE_ID_ATTRIBUTES.Contains(x.GetType())) && !skipValidate) if (attributes.Any(x => VALIDATE_ID_ATTRIBUTES.Contains(x.AttributeType)) && !skipValidate)
{ {
if (context.ActionArguments.TryGetValue("id", out var idObj)) if (context.ActionArguments.TryGetValue("id", out var idObj))
{ {