Fix loading time when opening an entity with many related entities

This commit is contained in:
Pierre Noël 2022-03-04 16:49:22 +01:00
parent 1cb4307bf8
commit 9d59305b0f

View File

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