Fixed: Correct Attribute compare for Id validation

pull/1230/head
Qstick 2 years ago
parent ffb3f83324
commit 5d2fefde8f

@ -62,7 +62,7 @@ namespace Prowlarr.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))
{ {

Loading…
Cancel
Save