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,14 +211,12 @@ export const UserFederationLdapSettings = () => {
const save = async (component: ComponentRepresentation) => {
try {
if (id) {
if (id === "new") {
if (!id) {
await adminClient.components.create(component);
history.push(`/${realm}/user-federation`);
} else {
await adminClient.components.update({ id }, component);
}
}
setupForm(component as ComponentRepresentation);
addAlert(
t(id === "new" ? "createSuccess" : "saveSuccess"),