mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 23:24:03 +00:00
fix: prevent transfering of component links
This commit is contained in:
parent
710e683d6b
commit
5985207d3b
@ -338,7 +338,16 @@ const filterValidRelationalAttributes = (attributes: Record<string, any>) => {
|
||||
};
|
||||
|
||||
const isComponentLike = (attribute: any) => {
|
||||
return attribute.component || attribute.components;
|
||||
return (
|
||||
/**
|
||||
* probably can remove attribute.component & attribute.components
|
||||
* to be checked
|
||||
* */
|
||||
attribute.component ||
|
||||
attribute.components ||
|
||||
attribute.joinTable?.name.includes('components') ||
|
||||
attribute.joinTable?.name.includes('cmps')
|
||||
);
|
||||
};
|
||||
|
||||
return Object.entries(attributes)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user