mirror of
https://github.com/strapi/strapi.git
synced 2025-09-07 23:57:19 +00:00
fix: check if it ends with _cmps
This commit is contained in:
parent
5985207d3b
commit
6ecc67b1e9
@ -337,18 +337,7 @@ const filterValidRelationalAttributes = (attributes: Record<string, any>) => {
|
||||
return attribute.owner || (!attribute.mappedBy && !attribute.morphBy);
|
||||
};
|
||||
|
||||
const isComponentLike = (attribute: any) => {
|
||||
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')
|
||||
);
|
||||
};
|
||||
const isComponentLike = (attribute: any) => attribute.joinTable?.name.endsWith('_cmps');
|
||||
|
||||
return Object.entries(attributes)
|
||||
.filter(([, attribute]) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user