From 53028fd8498c7b7ea997c1af51162d26d972ba05 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Sat, 13 Apr 2019 13:33:51 +0000 Subject: [groups,clients] include config as association --- server/models/group.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/models/group.js') diff --git a/server/models/group.js b/server/models/group.js index 0582970..16fd2f1 100644 --- a/server/models/group.js +++ b/server/models/group.js @@ -20,7 +20,7 @@ module.exports = (sequelize, DataTypes) => { group.belongsToMany(group, { as: 'subgroups', through: GroupXGroup, foreignKey: 'parentId', otherKey: 'childId' }) group.belongsToMany(models.client, { as: 'clients', through: GroupXClient, foreignKey: 'groupId', otherKey: 'clientId' }) group.belongsToMany(models.event, { as: 'events', through: GroupXEvent, foreignKey: 'groupId', otherKey: 'eventId' }) - group.belongsTo(models.config) + group.belongsTo(models.config, { as: 'config' }) group.hasMany(models.iprange, { as: 'ipranges' }) } return group -- cgit v1.2.3-55-g7522