We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6aad8da + af38948 commit 8c675f9Copy full SHA for 8c675f9
1 file changed
packages/contentstack-import/src/import/modules/entries.ts
@@ -1381,9 +1381,15 @@ export default class EntriesImport extends BaseClass {
1381
});
1382
1383
if (chunk) {
1384
- const apiContent = values(chunk as Record<string, any>[]).filter(
1385
- (content) => content?.publish_details?.length > 0,
1386
- );
+ const apiContent = values(chunk as Record<string, any>[])
+ .filter((content) => content?.publish_details?.length > 0)
+ .flatMap((content) =>
1387
+ content.publish_details.map((pubDetail: any) => ({
1388
+ ...content,
1389
+ locale: pubDetail.locale,
1390
+ publish_details: [pubDetail],
1391
+ })),
1392
+ );
1393
1394
log.debug(`Processing ${apiContent.length} publishable entries in chunk ${index}`, this.importConfig.context);
1395
0 commit comments