This commit is contained in:
David Arranz 2019-09-12 14:02:46 +02:00
parent e421ad9cf0
commit 7aed7d6a20
2 changed files with 10 additions and 3 deletions

View File

@ -178,7 +178,7 @@ console.log(inscription);
{
const OverflowEventId = inscription.overflowEventId;
if (await eventInscriptionService._validateInscription(inscription.id) > 0) {
if (await eventInscriptionService._validateInscription(inscription.id, user.id) > 0) {
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>><Inscripcion validada');
var NewConfirmedOverflow = await eventInscriptionService._getCountInscriptionsWithOverflowEventId(OverflowEventId);
var NewConfirmedEvent = await eventInscriptionService._getCountInscriptionsWithoutReservationAndOverflow(inscription.eventId);

View File

@ -57,7 +57,7 @@ module.exports = function (sequelize, DataTypes) {
}
}, {
tableName: 'events_inscriptions',
tableName: 'events_inscriptions',
freezeTableName: true,
timestamps: true,
@ -65,7 +65,14 @@ module.exports = function (sequelize, DataTypes) {
order: [
['date', 'DESC']
],
include: [{ model: sequelize.models.User, as: 'user' }],
include: [
// { model: sequelize.models.User, as: 'user' }
{
association: 'user',
require: false,
},
],
},
});