From acd492da8ada57eac3bb94df03841cb54983b7c5 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 7 Jun 2022 11:07:57 +0200 Subject: [PATCH] arreglo active reservation --- modules/events/events_reservations.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/events/events_reservations.controller.js b/modules/events/events_reservations.controller.js index 3ae40bc..1bf71ed 100644 --- a/modules/events/events_reservations.controller.js +++ b/modules/events/events_reservations.controller.js @@ -52,7 +52,10 @@ async function activeReservation(reservation) { throw new Error("activeReservation: reservation should be an object"); const eventToDiscountAssistants = reservation.overflow_reservationId ? await eventService._getEvent(reservation.overflow_reservationId) - : reservation.Event; + : (reservation.Event ? reservation.Event : reservation.event); + + console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>1', reservation.Event); + console.log(' >>>>>>>>>>>>>>>>>>>>>>>>>>2', reservation.event); //En el caso de ya estar publicada no hacemos nada se devuelve tal cual if (reservation.state === 'publish')