From 44fa9ad6e7ca914016454e6975892c5c824ca735 Mon Sep 17 00:00:00 2001 From: Jiri Lojda Date: Thu, 25 Jan 2024 16:10:13 +0100 Subject: [PATCH] Remove sitemap_location from imported items to prevent errors with non-existent locations --- package.json | 2 +- src/commands/importExportEntities/entities/contentItems.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 88d9df92..1fada266 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kontent-ai/data-ops", - "version": "0.3.0", + "version": "0.3.1", "description": "", "type": "module", "scripts": { diff --git a/src/commands/importExportEntities/entities/contentItems.ts b/src/commands/importExportEntities/entities/contentItems.ts index cecc51be..54680cbb 100644 --- a/src/commands/importExportEntities/entities/contentItems.ts +++ b/src/commands/importExportEntities/entities/contentItems.ts @@ -40,7 +40,8 @@ const createImportItemFetcher = type: { id: getRequired(context.contentTypeContextByOldIds, fileItem.type.id, "content type").selfId }, collection: { id: getRequired(context.collectionIdsByOldIds, fileItem.collection.id, "collection") }, external_id: fileItem.external_id ?? fileItem.codename, - }) + sitemap_locations: [], + } as ContentItemContracts.IAddContentItemPostContract) // The sitemap_locations is missing in the type .toPromise() .then(res => res.rawData); };