mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 15:19:00 +00:00
Merge pull request #139 from dj-hedgehog/master
fixed missing associations
This commit is contained in:
commit
c01c910eb6
@ -218,7 +218,9 @@ module.exports = {
|
||||
|
||||
defineAssociations: function (model, definition, association, key) {
|
||||
// Initialize associations object
|
||||
definition.associations = [];
|
||||
if (definition.associations === undefined) {
|
||||
definition.associations = [];
|
||||
}
|
||||
|
||||
// Exclude non-relational attribute
|
||||
if (!association.hasOwnProperty('collection') && !association.hasOwnProperty('model')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user