Fixed: Correct Attribute compare for Id validation

(cherry picked from commit 7e48ea0231272ae56c30f5f43339f0dca7a27fb3)
pull/7841/head
Qstick 2 years ago
parent c0caf65b69
commit 1751bd1a58

@ -74,7 +74,7 @@ namespace Radarr.Http.REST
}
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))
{

Loading…
Cancel
Save