Check if mod exists to prevent empty query aggregates

This commit is contained in:
Zeva Rose 2022-02-07 01:11:14 -07:00
parent 0d2d55ca40
commit a40c85065c
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "jarvis-core"
version = "0.1.1"
version = "0.1.2"
description = ""
authors = ["Your Name <you@example.com>"]