Skip to content

Commit

Permalink
fix: specific request crash (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reloadaxe authored Jan 9, 2025
1 parent a722ecb commit f39956e
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions server/src/libs/QueryEngine/parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,15 @@ export function recordToQuery<T extends object = object>(input: Record<string, s

for (const it of value) {
const params = parseParam(key, it)
if (!query[key]) {
query[key] = params
} else {
if (isObject(params)) {
objectLoop(params, (v, k) => {
(query[key] as any)[k] = v
return
})
} else {
query[key] = params
}
}
query[key] = query[key]
? {
"$and": [
query[key],
params
]
}
: params
}

})

return query as Query<T>
Expand Down

0 comments on commit f39956e

Please sign in to comment.