Skip to content

Commit 95dc130

Browse files
committed
Better handling for no org id on task run
1 parent fd4e207 commit 95dc130

2 files changed

Lines changed: 253 additions & 239 deletions

File tree

apps/webapp/app/routes/resources.runs.$runParam.logs.download.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ export async function loader({ params, request }: LoaderFunctionArgs) {
2929
},
3030
});
3131

32-
if (!run) {
32+
if (!run || !run.organizationId) {
3333
return new Response("Not found", { status: 404 });
3434
}
3535

36-
const eventRepository = resolveEventRepositoryForStore(
37-
run.taskEventStore,
38-
run.organizationId ?? ""
39-
);
36+
const eventRepository = resolveEventRepositoryForStore(run.taskEventStore, run.organizationId);
4037

4138
const runEvents = await eventRepository.getRunEvents(
4239
getTaskEventStoreTableForRun(run),

0 commit comments

Comments
 (0)