fix: Don't default to ROUND_ROBIN as user bookings don't have it set (#22210)

Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
This commit is contained in:
Hariom Balhara
2025-07-03 10:15:55 +05:30
committed by GitHub
co-authored by Anik Dhabal Babu
parent 02967961f3
commit f8a1bd7b94
@@ -489,7 +489,7 @@ export async function getBookings({
"EventType.disableCancelling",
"EventType.disableRescheduling",
eb
.cast<SchedulingType>(
.cast<SchedulingType | null>(
eb
.case()
.when("EventType.schedulingType", "=", "roundRobin")
@@ -498,7 +498,7 @@ export async function getBookings({
.then(SchedulingType["COLLECTIVE"])
.when("EventType.schedulingType", "=", "managed")
.then(SchedulingType["MANAGED"])
.else(SchedulingType["ROUND_ROBIN"]) // Ensure ELSE provides a value within SchedulingTypeLiteral for cast safety
.else(null)
.end(),
"varchar" // Or 'text' - use the actual SQL data type
)