Skip to content

Commit

Permalink
added the case to remove the reference from RTE advanced and custom
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Jan 22, 2024
1 parent e7c922b commit 2e2550c
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 2e2550c

Please sign in to comment.