Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Include ordered attendees in booking select query (#20935)

Anik Dhabal Babu41fafb9e5e22
diff --git a/packages/features/bookings/lib/getUserBooking.ts b/packages/features/bookings/lib/getUserBooking.ts
index edb1962a4fb..d27dbb85dea 100644
--- a/packages/features/bookings/lib/getUserBooking.ts
+++ b/packages/features/bookings/lib/getUserBooking.ts
@@ -42,6 +42,9 @@ const getUserBooking = async (uid: string) => {
timeZone: true,
phoneNumber: true,
},
+ orderBy: {
+ id: "asc",
+ },
},
eventTypeId: true,
eventType: {
diff --git a/packages/prisma/selects/booking.ts b/packages/prisma/selects/booking.ts
index 9615a17c551..b7a1f0eeb5a 100644
--- a/packages/prisma/selects/booking.ts
+++ b/packages/prisma/selects/booking.ts
@@ -8,6 +8,10 @@ export const bookingMinimalSelect = Prisma.validator<Prisma.BookingSelect>()({
customInputs: true,
startTime: true,
endTime: true,
- attendees: true,
+ attendees: {
+ orderBy: {
+ id: "asc",
+ },
+ },
metadata: true,
});