This is an automated email from the ASF dual-hosted git repository.
ppawar pushed a commit to branch atlas-2.5
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/atlas-2.5 by this push:
new a303ddc46 ATLAS-5048: [React UI] Glossary API call fails on tag and
term assignment update in entity detail page (#366)
a303ddc46 is described below
commit a303ddc4630e6bfb6c36299797e98450ad917c37
Author: Brijesh Bhalala <[email protected]>
AuthorDate: Fri Jun 6 19:13:39 2025 +0530
ATLAS-5048: [React UI] Glossary API call fails on tag and term assignment
update in entity detail page (#366)
---
dashboard/src/components/ShowMore/DrawerBodyChipView.tsx | 9 ++++++---
dashboard/src/components/ShowMore/ShowMoreView.tsx | 10 +++++++---
dashboard/src/views/Glossary/AssignTerm.tsx | 11 ++++++++---
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/dashboard/src/components/ShowMore/DrawerBodyChipView.tsx
b/dashboard/src/components/ShowMore/DrawerBodyChipView.tsx
index df40faf6b..dbabc1e17 100644
--- a/dashboard/src/components/ShowMore/DrawerBodyChipView.tsx
+++ b/dashboard/src/components/ShowMore/DrawerBodyChipView.tsx
@@ -168,10 +168,13 @@ const DrawerBodyChipView = ({
dispatchApi(fetchDetailPageData(guid as string));
if (!isEmpty(guid)) {
- let params: any = { gtype: gType, guid: guid };
- dispatchApi(fetchGlossaryData());
- dispatchApi(fetchGlossaryDetails(params));
dispatchApi(fetchDetailPageData(guid as string));
+
+ if (!isEmpty(gType)) {
+ const params = { gtype: gType, guid };
+ dispatchApi(fetchGlossaryData());
+ dispatchApi(fetchGlossaryDetails(params));
+ }
}
} catch (error) {
setRemoveLoader(false);
diff --git a/dashboard/src/components/ShowMore/ShowMoreView.tsx
b/dashboard/src/components/ShowMore/ShowMoreView.tsx
index a132204af..b0b3de31b 100644
--- a/dashboard/src/components/ShowMore/ShowMoreView.tsx
+++ b/dashboard/src/components/ShowMore/ShowMoreView.tsx
@@ -170,11 +170,15 @@ const ShowMoreView = ({
toast.dismiss(toastId.current);
toastId.current = toast.success(`${title} was removed successfully`);
dispatchApi(fetchDetailPageData(guid as string));
+
if (!isEmpty(guid)) {
- let params: any = { gtype: gType, guid: guid };
- dispatchApi(fetchGlossaryData());
- dispatchApi(fetchGlossaryDetails(params));
dispatchApi(fetchDetailPageData(guid as string));
+
+ if (!isEmpty(gType)) {
+ const params = { gtype: gType, guid };
+ dispatchApi(fetchGlossaryData());
+ dispatchApi(fetchGlossaryDetails(params));
+ }
}
} catch (error) {
console.log(`Error occur while removing ${title}`, error);
diff --git a/dashboard/src/views/Glossary/AssignTerm.tsx
b/dashboard/src/views/Glossary/AssignTerm.tsx
index 16c7ff218..e7525a12c 100644
--- a/dashboard/src/views/Glossary/AssignTerm.tsx
+++ b/dashboard/src/views/Glossary/AssignTerm.tsx
@@ -344,12 +344,17 @@ const AssignTerm = ({
if (!isEmpty(updateTable)) {
updateTable(moment.now());
}
+
if (!isEmpty(entityGuid)) {
- let params: any = { gtype: gType, guid: entityGuid };
- dispatchApi(fetchGlossaryData());
- dispatchApi(fetchGlossaryDetails(params));
dispatchApi(fetchDetailPageData(entityGuid as string));
+
+ if (!isEmpty(gType)) {
+ const params = { gtype: gType, entityGuid };
+ dispatchApi(fetchGlossaryData());
+ dispatchApi(fetchGlossaryDetails(params));
+ }
}
+
if (!isEmpty(setRowSelection)) {
setRowSelection({});
}