Skip to content

Commit

Permalink
Merge pull request #1256 from contentstack/bugfix/CS-43624
Browse files Browse the repository at this point in the history
CS-43624-fix for handling references in rte
  • Loading branch information
cs-raj authored Jan 23, 2024
2 parents d0da4af + 7a121e8 commit c56f9db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@contentstack/cli-cm-export": "~1.10.2",
"@contentstack/cli-cm-import": "~1.13.0",
"@contentstack/cli-cm-import": "~1.13.1",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.10",
"@colors/colors": "^1.5.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/contentstack-import/src/utils/content-type-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ export const removeReferenceFields = async function (
flag.supressed = true;
schema[i].reference_to = ['sys_assets'];
}
else if (
// handling entry references in rte
schema[i].data_type === 'text' &&
schema[i].field_metadata.rich_text_type &&
schema[i].field_metadata.embed_entry &&
schema[i].reference_to.length >= 1
) {
flag.supressed = true;
schema[i].reference_to = ['sys_assets'];
}
}
};

Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c56f9db

Please sign in to comment.