fix: view event details without session

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-10-23 15:13:01 +02:00
parent 07762211d2
commit b8ad8dfede
2 changed files with 7 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ import { z } from 'zod';
import {
type IServiceProfile,
type IServiceSession,
TABLE_NAMES,
chQuery,
convertClickhouseDateToJs,
@@ -104,7 +105,10 @@ export const eventRouter = createTRPCRouter({
});
}
const session = await sessionService.byId(res?.sessionId, projectId);
let session: IServiceSession | undefined;
if (res?.sessionId) {
session = await sessionService.byId(res?.sessionId, projectId);
}
return {
event: res,