Skip to content

Scheduling infrastructure for absolutely everyone.

fix: column f.userid does not exist (#18215)

Anik Dhabal Babu5293a5cc54a5
diff --git a/packages/features/insights/server/routing-events.ts b/packages/features/insights/server/routing-events.ts
index 7eff6b4e291..a6f3595dec1 100644
--- a/packages/features/insights/server/routing-events.ts
+++ b/packages/features/insights/server/routing-events.ts
@@ -391,7 +391,7 @@ class RoutingEventsInsights {
}
// @ts-expect-error it doest exist but TS isnt smart enough when its unmber or int filter
if (!formsWhereCondition.teamId?.in && userId) {
- teamConditions.push(`f.userId = '${userId}'`);
+ teamConditions.push(`f."userId" = ${userId}`);
}
if (routingFormId) {
teamConditions.push(`f.id = '${routingFormId}'`);
@@ -770,7 +770,7 @@ class RoutingEventsInsights {
}
// @ts-expect-error it does exist but TS isn't smart enough when it's number or int filter
if (!formsWhereCondition.teamId?.in && userId) {
- teamConditions.push(`f.userId = '${userId}'`);
+ teamConditions.push(`f."userId" = ${userId}`);
}
if (routingFormId) {
teamConditions.push(`f.id = '${routingFormId}'`);
@@ -1025,7 +1025,7 @@ class RoutingEventsInsights {
}
// @ts-expect-error it does exist but TS isn't smart enough when it's number or int filter
if (!formsWhereCondition.teamId?.in && userId) {
- teamConditions.push(`f.userId = '${userId}'`);
+ teamConditions.push(`f."userId" = ${userId}`);
}
if (routingFormId) {
teamConditions.push(`f.id = '${routingFormId}'`);