diff --git a/packages/features/insights/server/trpc-router.ts b/packages/features/insights/server/trpc-router.ts index 88788ec506..5f1280fa28 100644 --- a/packages/features/insights/server/trpc-router.ts +++ b/packages/features/insights/server/trpc-router.ts @@ -71,7 +71,22 @@ const buildBaseWhereCondition = async ({ id: true, }, }); - if (teamsFromOrg.length === 0) return { whereCondition, isEmptyResponse: true }; + + if (teamsFromOrg.length === 0) { + return { + whereCondition: { + ...whereCondition, + OR: [ + ...(whereCondition.OR ?? []), + { + teamId: ctx.userOrganizationId, + isTeamBooking: true, + }, + ], + }, + isEmptyResponse: true, + }; + } const teamConditional = { id: {