a
This commit is contained in:
parent
13b309f485
commit
68768b9a51
@ -271,7 +271,9 @@ module.exports = function (sequelize, DataTypes) {
|
|||||||
Event.addScope('includeInscription', (userId) => {
|
Event.addScope('includeInscription', (userId) => {
|
||||||
return {
|
return {
|
||||||
include: [
|
include: [
|
||||||
{ model: sequelize.models.EventInscription, as: 'inscriptions', required: false, where: { userId: userId } }
|
{ model: sequelize.models.EventInscription, as: 'inscriptions',
|
||||||
|
required: false,
|
||||||
|
where: { userId: userId } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -279,7 +281,11 @@ module.exports = function (sequelize, DataTypes) {
|
|||||||
Event.addScope('includeOverflowEvent', () => {
|
Event.addScope('includeOverflowEvent', () => {
|
||||||
return {
|
return {
|
||||||
include: [
|
include: [
|
||||||
{ model: sequelize.models.Event, as: 'overflowEvent', required: false}
|
{ model: sequelize.models.Event,
|
||||||
|
as: 'overflowEvent',
|
||||||
|
required: false,
|
||||||
|
where: { typeId: { [Sequelize.Op.ne]: null}}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user