fix 404 issue on new
This commit is contained in:
parent
733d5f4b6f
commit
489ed64049
2 changed files with 10 additions and 6 deletions
|
@ -93,9 +93,11 @@ export const UserFederationKerberosSettings = () => {
|
|||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const fetchedComponent = await adminClient.components.findOne({ id });
|
||||
if (fetchedComponent) {
|
||||
setupForm(fetchedComponent);
|
||||
if (id !== "new") {
|
||||
const fetchedComponent = await adminClient.components.findOne({ id });
|
||||
if (fetchedComponent) {
|
||||
setupForm(fetchedComponent);
|
||||
}
|
||||
}
|
||||
})();
|
||||
}, []);
|
||||
|
|
|
@ -123,9 +123,11 @@ export const UserFederationLdapSettings = () => {
|
|||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const fetchedComponent = await adminClient.components.findOne({ id });
|
||||
if (fetchedComponent) {
|
||||
setupForm(fetchedComponent);
|
||||
if (id !== "new") {
|
||||
const fetchedComponent = await adminClient.components.findOne({ id });
|
||||
if (fetchedComponent) {
|
||||
setupForm(fetchedComponent);
|
||||
}
|
||||
}
|
||||
})();
|
||||
}, []);
|
||||
|
|
Loading…
Reference in a new issue