diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts index 161a4bffbae..e59b83d7327 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts @@ -10,6 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { EntityType } from '../enums/entity.enum'; import { MOCKED_GLOSSARY_TERMS, MOCKED_GLOSSARY_TERMS_1, @@ -41,12 +42,17 @@ describe('Glossary Utils', () => { must_not: [ { term: { - entityType: 'glossaryTerm', + entityType: EntityType.GLOSSARY_TERM, }, }, { term: { - entityType: 'tag', + entityType: EntityType.TAG, + }, + }, + { + term: { + entityType: EntityType.DATA_PRODUCT, }, }, ], diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts index 0efa2632c14..4d82e90ae4b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts @@ -13,6 +13,7 @@ import { StatusType } from '../components/common/StatusBadge/StatusBadge.interface'; import { FQN_SEPARATOR_CHAR } from '../constants/char.constants'; +import { EntityType } from '../enums/entity.enum'; import { Glossary } from '../generated/entity/data/glossary'; import { GlossaryTerm, Status } from '../generated/entity/data/glossaryTerm'; import { EntityReference } from '../generated/type/entityReference'; @@ -93,12 +94,17 @@ export const getQueryFilterToExcludeTerm = (fqn: string) => ({ must_not: [ { term: { - entityType: 'glossaryTerm', + entityType: EntityType.GLOSSARY_TERM, }, }, { term: { - entityType: 'tag', + entityType: EntityType.TAG, + }, + }, + { + term: { + entityType: EntityType.DATA_PRODUCT, }, }, ],