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
This commit is contained in:
Jared Tracy 2024-02-12 20:12:54 -06:00
parent 4e8bf4903d
commit 55c2a8612b
1 changed files with 1 additions and 1 deletions

View File

@ -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
},