web/admin: always override send method instead of assigning (#5426)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -45,7 +45,7 @@ export class FlowForm extends ModelForm<Flow, string> {
|
||||
@property({ type: Boolean })
|
||||
clearBackground = false;
|
||||
|
||||
send = async (data: Flow): Promise<void | Flow> => {
|
||||
async send(data: Flow): Promise<void | Flow> {
|
||||
let flow: Flow;
|
||||
if (this.instance) {
|
||||
flow = await new FlowsApi(DEFAULT_CONFIG).flowsInstancesUpdate({
|
||||
@ -76,7 +76,7 @@ export class FlowForm extends ModelForm<Flow, string> {
|
||||
});
|
||||
}
|
||||
return flow;
|
||||
};
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
return html`<form class="pf-c-form pf-m-horizontal">
|
||||
|
||||
@ -26,7 +26,7 @@ export class FlowImportForm extends Form<Flow> {
|
||||
return super.styles.concat(PFDescriptionList);
|
||||
}
|
||||
|
||||
send = async (): Promise<FlowImportResult> => {
|
||||
async send(): Promise<FlowImportResult> {
|
||||
const file = this.getFormFiles()["flow"];
|
||||
if (!file) {
|
||||
throw new SentryIgnoredError("No form data");
|
||||
@ -39,7 +39,7 @@ export class FlowImportForm extends Form<Flow> {
|
||||
throw new SentryIgnoredError("Failed to import flow");
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
renderResult(): TemplateResult {
|
||||
return html`
|
||||
|
||||
Reference in New Issue
Block a user