fix: prevent transfering of component links

This commit is contained in:
Bassel Kanso 2024-05-28 16:03:03 +03:00
parent 710e683d6b
commit 5985207d3b

View File

@ -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)