fixed flow name (#1049)

fixes: #1045
This commit is contained in:
Erik Jan de Wit 2021-08-25 14:33:57 +02:00 committed by GitHub
parent 74a42b739f
commit 02ffc1fb88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,12 +46,12 @@ export const DuplicateFlowModal = ({
try {
await adminClient.authenticationManagement.copyFlow({
flow: name,
newName: form.name,
newName: form.alias,
});
if (form.description !== description) {
const newFlow = (
await adminClient.authenticationManagement.getFlows()
).find((flow) => flow.alias === form.name)!;
).find((flow) => flow.alias === form.alias)!;
newFlow.description = form.description;
await adminClient.authenticationManagement.updateFlow(