Skip to content
Snippets Groups Projects
Commit b5199fe3 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Merge branch 'TMSS-reservation-bug' into 'master'

fix duplicate reservation retrieval in service

See merge request !1133
parents e537f81c 119ed78d
No related branches found
No related tags found
1 merge request!1133fix duplicate reservation retrieval in service
...@@ -65,7 +65,9 @@ const ReservationService = { ...@@ -65,7 +65,9 @@ const ReservationService = {
} }
if (stopTime) { // Get the reservations started before the stopTime and exists. if (stopTime) { // Get the reservations started before the stopTime and exists.
let indefiniteReservations = await ReservationService.getTimelineReservations(stopTime); let indefiniteReservations = await ReservationService.getTimelineReservations(stopTime);
reservations = reservations.concat(indefiniteReservations); reservations = reservations.map(reservation => ( //filter on unique reservations (id)
{...reservation, ...indefiniteReservations.find(indefiniteReservation => indefiniteReservation.id === reservation.id)}
))
} }
} catch(error) { } catch(error) {
console.error('[schedule.services.getTimelineReservations]',error); console.error('[schedule.services.getTimelineReservations]',error);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment