From 61c97790223902df58bf950066f35c364b608aa3 Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 30 Nov 2022 22:09:18 -0600 Subject: [PATCH] Fixed: Correct Attribute compare for Id validation (cherry picked from commit 7e48ea0231272ae56c30f5f43339f0dca7a27fb3) --- src/Readarr.Http/REST/RestController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ namespace Readarr.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)) {