From 5293a5cc54a52c1105917ca4f8fe611292fe913d Mon Sep 17 00:00:00 2001 From: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:07:48 +0530 Subject: [PATCH] fix: column f.userid does not exist (#18215) --- packages/features/insights/server/routing-events.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/features/insights/server/routing-events.ts b/packages/features/insights/server/routing-events.ts index 7eff6b4e29..a6f3595dec 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}'`);