From 6ecc67b1e9148e497dbc96e9639567c8bf1d4e5c Mon Sep 17 00:00:00 2001 From: Bassel Kanso Date: Wed, 29 May 2024 15:04:32 +0300 Subject: [PATCH] fix: check if it ends with _cmps --- .../core/data-transfer/src/strapi/queries/link.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/core/data-transfer/src/strapi/queries/link.ts b/packages/core/data-transfer/src/strapi/queries/link.ts index deea987bf0..cc376638cc 100644 --- a/packages/core/data-transfer/src/strapi/queries/link.ts +++ b/packages/core/data-transfer/src/strapi/queries/link.ts @@ -337,18 +337,7 @@ const filterValidRelationalAttributes = (attributes: Record) => { return attribute.owner || (!attribute.mappedBy && !attribute.morphBy); }; - const isComponentLike = (attribute: any) => { - return ( - /** - * probably can remove attribute.component & attribute.components - * to be checked - * */ - attribute.component || - attribute.components || - attribute.joinTable?.name.includes('components') || - attribute.joinTable?.name.includes('cmps') - ); - }; + const isComponentLike = (attribute: any) => attribute.joinTable?.name.endsWith('_cmps'); return Object.entries(attributes) .filter(([, attribute]) => {