Skip to content

Commit f8a1bd7

Browse files
fix: Don't default to ROUND_ROBIN as user bookings don't have it set (calcom#22210)
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
1 parent 0296796 commit f8a1bd7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/trpc/server/routers/viewer/bookings/get.handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export async function getBookings({
489489
"EventType.disableCancelling",
490490
"EventType.disableRescheduling",
491491
eb
492-
.cast<SchedulingType>(
492+
.cast<SchedulingType | null>(
493493
eb
494494
.case()
495495
.when("EventType.schedulingType", "=", "roundRobin")
@@ -498,7 +498,7 @@ export async function getBookings({
498498
.then(SchedulingType["COLLECTIVE"])
499499
.when("EventType.schedulingType", "=", "managed")
500500
.then(SchedulingType["MANAGED"])
501-
.else(SchedulingType["ROUND_ROBIN"]) // Ensure ELSE provides a value within SchedulingTypeLiteral for cast safety
501+
.else(null)
502502
.end(),
503503
"varchar" // Or 'text' - use the actual SQL data type
504504
)

0 commit comments

Comments
 (0)