Check if mod exists to prevent empty query aggregates
This commit is contained in:
parent
0d2d55ca40
commit
a40c85065c
2 changed files with 3 additions and 2 deletions
|
@ -39,6 +39,7 @@ def q(**kwargs: dict) -> dict:
|
|||
v = ObjectId(v)
|
||||
elif "__" in k:
|
||||
k, mod, *_ = k.split("__")
|
||||
if mod:
|
||||
v = {f"${mod}": v}
|
||||
query[k] = v
|
||||
return query
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "jarvis-core"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
description = ""
|
||||
authors = ["Your Name <you@example.com>"]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue