diff --git a/src/Readarr.Http/REST/RestController.cs b/src/Readarr.Http/REST/RestController.cs index eb4f2b414..7b9b75341 100644 --- a/src/Readarr.Http/REST/RestController.cs +++ b/src/Readarr.Http/REST/RestController.cs @@ -74,7 +74,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)) {