From a3dad7ad52fde05a276bfbea1feab35a42aa2412 Mon Sep 17 00:00:00 2001 From: bhardwajakshit Date: Mon, 20 Nov 2023 06:40:39 +0530 Subject: [PATCH] feat(core): Add Missing inheritFilters field for Collection for InitialData --- packages/core/src/data-import/providers/populator/populator.ts | 1 + packages/core/src/data-import/types.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/core/src/data-import/providers/populator/populator.ts b/packages/core/src/data-import/providers/populator/populator.ts index 2fabfc1cc0..efd7dbf749 100644 --- a/packages/core/src/data-import/providers/populator/populator.ts +++ b/packages/core/src/data-import/providers/populator/populator.ts @@ -148,6 +148,7 @@ export class Populator { assetIds: assets.map(a => a.id.toString()), featuredAssetId: assets.length ? assets[0].id.toString() : undefined, filters, + inheritFilters: collectionDef.inheritFilters ?? true, }); collectionMap.set(collectionDef.name, collection); } diff --git a/packages/core/src/data-import/types.ts b/packages/core/src/data-import/types.ts index 351b2ba09e..5d70df430b 100644 --- a/packages/core/src/data-import/types.ts +++ b/packages/core/src/data-import/types.ts @@ -27,6 +27,7 @@ export interface CollectionDefinition { slug?: string; private?: boolean; filters?: CollectionFilterDefinition[]; + inheritFilters?: boolean; parentName?: string; assetPaths?: string[]; }