From 1f43713986d5e48201e0890648d984fb42f8e7e6 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 3 Jun 2026 16:02:17 -0700 Subject: [PATCH] Fix saving the rules --- .../resource-policy/EditPolicyRulesSectionForm.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/resource-policy/EditPolicyRulesSectionForm.tsx b/src/components/resource-policy/EditPolicyRulesSectionForm.tsx index 78a37ce58..13a344525 100644 --- a/src/components/resource-policy/EditPolicyRulesSectionForm.tsx +++ b/src/components/resource-policy/EditPolicyRulesSectionForm.tsx @@ -750,10 +750,19 @@ export function EditPolicyRulesSectionForm({ return; } - const isValid = form.trigger(); + const isValid = await form.trigger(); if (!isValid) return; - const payload = form.getValues(); + const payload = { + applyRules: form.getValues("applyRules") ?? false, + rules: rules.map(({ action, match, value, priority, enabled }) => ({ + action, + match, + value, + priority, + enabled + })) + }; try { const res = await api