mirror of
https://github.com/strapi/strapi.git
synced 2025-08-18 13:45:25 +00:00
Merge branch 'develop' into clean-assets
This commit is contained in:
commit
a9ff593b73
@ -46,7 +46,16 @@ const populateAssociations = (definition, { prefix = '' } = {}) => {
|
||||
const populateBareAssociations = (definition, { prefix = '' } = {}) => {
|
||||
return definition.associations
|
||||
.filter(ast => ast.autoPopulate !== false)
|
||||
.map(assoc => `${prefix}${assoc.alias}`);
|
||||
.map(assoc => {
|
||||
if (isPolymorphic({ assoc })) {
|
||||
return formatPolymorphicPopulate({
|
||||
assoc,
|
||||
prefix,
|
||||
});
|
||||
}
|
||||
|
||||
return `${prefix}${assoc.alias}`;
|
||||
});
|
||||
};
|
||||
|
||||
const formatAssociationPopulate = ({ assoc, prefix = '' }) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user