small update - id is an issue

This commit is contained in:
mfrances 2021-02-09 16:12:50 -05:00
parent 6c63a8d4dc
commit 70f1629be0

View file

@ -110,7 +110,11 @@ export const UserFederationKerberosSettings = () => {
console.log("SAVING as:");
console.log(component);
try {
await adminClient.components.update({ id }, component);
if (id) {
await adminClient.components.update({ id }, component);
} else {
await adminClient.components.create(component);
}
setupForm(component as ComponentRepresentation);
addAlert(t("saveSuccess"), AlertVariant.success);
} catch (error) {