From 119e278046484196e05d282873057d5b5b54df81 Mon Sep 17 00:00:00 2001 From: Dharma Saputra Date: Thu, 5 Dec 2024 16:52:10 +0900 Subject: [PATCH] fix: skip populate hidden reference --- src/backend/utils/populator/populator.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/utils/populator/populator.ts b/src/backend/utils/populator/populator.ts index e895d4697..c660ef806 100644 --- a/src/backend/utils/populator/populator.ts +++ b/src/backend/utils/populator/populator.ts @@ -18,8 +18,7 @@ export async function populator( const resourceDecorator = records[0].resource.decorate() const allProperties = Object.values(resourceDecorator.getFlattenProperties()) - const references = allProperties.filter((p) => !!p.reference()) - + const references = allProperties.filter((p) => !!p.reference() && (p.isVisible('show') || p.isVisible('list') || p.isVisible('edit') || p.isVisible('filter'))) await Promise.all(references.map(async (propertyDecorator) => { await populateProperty(records, propertyDecorator, context) }))