Skip to content

Commit 694b595

Browse files
authored
Merge pull request #1424 from contentstack/fix/dev
fixed the entry migration script for contentTypes
2 parents 940a7d2 + 394cf32 commit 694b595

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/contentstack-branches/src/utils/entry-create-script.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export function entryCreateScript(contentType) {
471471
472472
const entriesSearchResponse = await managementAPIClient
473473
.stack({ api_key: stackSDKInstance.api_key, branch_uid: branchName })
474-
.contentType('${contentType}')
474+
.contentType(contentType)
475475
.entry()
476476
.query(requestObject)
477477
.find();
@@ -482,7 +482,7 @@ export function entryCreateScript(contentType) {
482482
if (skip >= entriesSearchResponse.count) {
483483
return entries;
484484
}
485-
return await getEntries(branchName, skip, limit, entries);
485+
return await getEntries(branchName, contentType, skip, limit, entries);
486486
}
487487
return entries;
488488
};

packages/contentstack-branches/src/utils/entry-create-update-script.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export function entryCreateUpdateScript(contentType) {
485485
486486
const entriesSearchResponse = await managementAPIClient
487487
.stack({ api_key: stackSDKInstance.api_key, branch_uid: branchName })
488-
.contentType('${contentType}')
488+
.contentType(contentType)
489489
.entry()
490490
.query(requestObject)
491491
.find();
@@ -496,7 +496,7 @@ export function entryCreateUpdateScript(contentType) {
496496
if (skip >= entriesSearchResponse.count) {
497497
return entries;
498498
}
499-
return await getEntries(branchName, skip, limit, entries);
499+
return await getEntries(branchName, contentType, skip, limit, entries);
500500
}
501501
return entries;
502502
};

packages/contentstack-branches/src/utils/entry-update-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export function entryUpdateScript(contentType) {
485485
486486
const entriesSearchResponse = await managementAPIClient
487487
.stack({ api_key: stackSDKInstance.api_key, branch_uid: branchName })
488-
.contentType('${contentType}')
488+
.contentType(contentType)
489489
.entry()
490490
.query(requestObject)
491491
.find();

0 commit comments

Comments
 (0)