From 55c2a8612b9065a1ee5d2cbafb0dfb34fed53710 Mon Sep 17 00:00:00 2001 From: Jared Tracy Date: Mon, 12 Feb 2024 20:12:54 -0600 Subject: [PATCH] fixes bug where querying by chatId results in no records previous logic for where clause of memoryType checked for existence of chatId and would query for memoryType is null This where clause logic results in an empty result for any request to the endpoint that filters by chatId --- packages/server/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 07797f32..a6566a5b 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1453,7 +1453,7 @@ export class App { chatflowid, chatType, chatId, - memoryType: memoryType ?? (chatId ? IsNull() : undefined), + memoryType: memoryType ?? undefined, sessionId: sessionId ?? undefined, createdDate: toDate && fromDate ? Between(fromDate, toDate) : undefined },