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