fix 404 issue on new

This commit is contained in:
mfrances 2021-02-22 09:52:49 -05:00
parent 733d5f4b6f
commit 489ed64049
2 changed files with 10 additions and 6 deletions

View file

@ -93,10 +93,12 @@ export const UserFederationKerberosSettings = () => {
useEffect(() => { useEffect(() => {
(async () => { (async () => {
if (id !== "new") {
const fetchedComponent = await adminClient.components.findOne({ id }); const fetchedComponent = await adminClient.components.findOne({ id });
if (fetchedComponent) { if (fetchedComponent) {
setupForm(fetchedComponent); setupForm(fetchedComponent);
} }
}
})(); })();
}, []); }, []);

View file

@ -123,10 +123,12 @@ export const UserFederationLdapSettings = () => {
useEffect(() => { useEffect(() => {
(async () => { (async () => {
if (id !== "new") {
const fetchedComponent = await adminClient.components.findOne({ id }); const fetchedComponent = await adminClient.components.findOne({ id });
if (fetchedComponent) { if (fetchedComponent) {
setupForm(fetchedComponent); setupForm(fetchedComponent);
} }
}
})(); })();
}, []); }, []);