diff --git a/src/Sonarr.Http/REST/RestController.cs b/src/Sonarr.Http/REST/RestController.cs index 13c51cd4b..180b2a25a 100644 --- a/src/Sonarr.Http/REST/RestController.cs +++ b/src/Sonarr.Http/REST/RestController.cs @@ -88,7 +88,7 @@ public override void OnActionExecuting(ActionExecutingContext context) } 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)) {