mirror of
https://github.com/strapi/strapi.git
synced 2025-12-30 00:37:24 +00:00
Fix loading time when opening an entity with many related entities
This commit is contained in:
parent
1cb4307bf8
commit
9d59305b0f
@ -55,9 +55,7 @@ const getDeepPopulate = (uid, populate, depth = 0) => {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
if (attribute.type === 'relation') {
|
||||
populateAcc[attributeName] = attribute.target
|
||||
? { populate: getDeepPopulate(attribute.target, null, depth + 1) }
|
||||
: true;
|
||||
populateAcc[attributeName] = true; // Only populate first level of relations
|
||||
}
|
||||
|
||||
if (attribute.type === 'component') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user