fix: Unordered bookings (#10943)

This commit is contained in:
Hariom Balhara
2023-08-25 15:06:57 +05:30
committed by GitHub
parent 58f4224c66
commit 1727eb5625
@@ -383,6 +383,7 @@ async function getBookings({
);
const plainBookings = getUniqueBookings(
// It's going to mess up the orderBy as we are concatenating independent queries results
bookingsQueryUserId
.concat(bookingsQueryAttendees)
.concat(bookingsQueryTeamMember)
@@ -399,6 +400,8 @@ async function getBookings({
},
},
select: bookingSelect,
// We need to get the sorted bookings here as well because plainBookings array is not correctly sorted
orderBy,
})
).map((booking) => {
// If seats are enabled and the event is not set to show attendees, filter out attendees that are not the current user