fixed creating new ldap settings

This commit is contained in:
Erik Jan de Wit 2021-04-16 07:35:51 +02:00 committed by mfrances
parent f73c9afdd8
commit c87196cfd1

View file

@ -211,13 +211,11 @@ export const UserFederationLdapSettings = () => {
const save = async (component: ComponentRepresentation) => { const save = async (component: ComponentRepresentation) => {
try { try {
if (id) { if (!id) {
if (id === "new") { await adminClient.components.create(component);
await adminClient.components.create(component); history.push(`/${realm}/user-federation`);
history.push(`/${realm}/user-federation`); } else {
} else { await adminClient.components.update({ id }, component);
await adminClient.components.update({ id }, component);
}
} }
setupForm(component as ComponentRepresentation); setupForm(component as ComponentRepresentation);
addAlert( addAlert(