From d5307adef0a6b17f43b86026a301a0a74d335f01 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Fri, 12 Dec 2025 22:52:00 -0500 Subject: [PATCH] fix bug preventing save resource priority closes #2063 --- .../settings/resources/proxy/[niceId]/rules/page.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/[orgId]/settings/resources/proxy/[niceId]/rules/page.tsx b/src/app/[orgId]/settings/resources/proxy/[niceId]/rules/page.tsx index 39badea4..78a1b896 100644 --- a/src/app/[orgId]/settings/resources/proxy/[niceId]/rules/page.tsx +++ b/src/app/[orgId]/settings/resources/proxy/[niceId]/rules/page.tsx @@ -449,15 +449,16 @@ export default function ResourceRules(props: { type="number" onClick={(e) => e.currentTarget.focus()} onBlur={(e) => { - const parsed = z + const parsed = z.coerce + .number() .int() .optional() .safeParse(e.target.value); - if (!parsed.data) { + if (!parsed.success) { toast({ variant: "destructive", - title: t("rulesErrorInvalidIpAddress"), // correct priority or IP? + title: t("rulesErrorInvalidPriority"), // correct priority or IP? description: t( "rulesErrorInvalidPriorityDescription" )