web/admin: fix EventMatcherPolicyForm empty values (#6539)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
7cd7017d5f
commit
3040294e17
|
@ -36,6 +36,10 @@ export class EventMatcherPolicyForm extends ModelForm<EventMatcherPolicy, string
|
|||
}
|
||||
|
||||
async send(data: EventMatcherPolicy): Promise<EventMatcherPolicy> {
|
||||
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 || "",
|
||||
|
|
Reference in New Issue