fixed creating new ldap settings
This commit is contained in:
parent
f73c9afdd8
commit
c87196cfd1
1 changed files with 5 additions and 7 deletions
|
@ -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"),
|
||||
|
|
Loading…
Reference in a new issue