From 3040294e17ff262baee46ffdb57b9694c1edff51 Mon Sep 17 00:00:00 2001 From: Jens L Date: Mon, 14 Aug 2023 18:18:49 +0100 Subject: [PATCH] web/admin: fix EventMatcherPolicyForm empty values (#6539) Signed-off-by: Jens Langhammer --- .../admin/policies/event_matcher/EventMatcherPolicyForm.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/admin/policies/event_matcher/EventMatcherPolicyForm.ts b/web/src/admin/policies/event_matcher/EventMatcherPolicyForm.ts index 4b0ae53fb..e815979c6 100644 --- a/web/src/admin/policies/event_matcher/EventMatcherPolicyForm.ts +++ b/web/src/admin/policies/event_matcher/EventMatcherPolicyForm.ts @@ -36,6 +36,10 @@ export class EventMatcherPolicyForm extends ModelForm { + if (data.action?.toString() === "") data.action = null; + if (data.clientIp?.toString() === "") data.clientIp = null; + if (data.app?.toString() === "") data.app = null; + if (data.model?.toString() === "") data.model = null; if (this.instance) { return new PoliciesApi(DEFAULT_CONFIG).policiesEventMatcherUpdate({ policyUuid: this.instance.pk || "",