web/admin: always override send method instead of assigning (#5426)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		@ -44,7 +44,7 @@ export class RuleForm extends ModelForm<NotificationRule, string> {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    send = (data: NotificationRule): Promise<NotificationRule> => {
 | 
			
		||||
    async send(data: NotificationRule): Promise<NotificationRule> {
 | 
			
		||||
        if (this.instance) {
 | 
			
		||||
            return new EventsApi(DEFAULT_CONFIG).eventsRulesUpdate({
 | 
			
		||||
                pbmUuid: this.instance.pk || "",
 | 
			
		||||
@ -55,7 +55,7 @@ export class RuleForm extends ModelForm<NotificationRule, string> {
 | 
			
		||||
                notificationRuleRequest: data,
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    renderForm(): TemplateResult {
 | 
			
		||||
        return html`<form class="pf-c-form pf-m-horizontal">
 | 
			
		||||
 | 
			
		||||
@ -44,7 +44,7 @@ export class TransportForm extends ModelForm<NotificationTransport, string> {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    send = (data: NotificationTransport): Promise<NotificationTransport> => {
 | 
			
		||||
    async send(data: NotificationTransport): Promise<NotificationTransport> {
 | 
			
		||||
        if (this.instance) {
 | 
			
		||||
            return new EventsApi(DEFAULT_CONFIG).eventsTransportsUpdate({
 | 
			
		||||
                uuid: this.instance.pk || "",
 | 
			
		||||
@ -55,7 +55,7 @@ export class TransportForm extends ModelForm<NotificationTransport, string> {
 | 
			
		||||
                notificationTransportRequest: data,
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    onModeChange(mode: string | undefined): void {
 | 
			
		||||
        if (
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user