Merge branch 'master' of github.com:MongoEngine/mongoengine into abarto-feature/allow-setting-read-concern-queryset

This commit is contained in:
Bastien Gérard
2020-03-03 23:50:36 +01:00
3 changed files with 9 additions and 2 deletions

View File

@@ -169,9 +169,9 @@ def query(_doc_cls=None, **kwargs):
key = ".".join(parts)
if op is None or key not in mongo_query:
if key not in mongo_query:
mongo_query[key] = value
elif key in mongo_query:
else:
if isinstance(mongo_query[key], dict) and isinstance(value, dict):
mongo_query[key].update(value)
# $max/minDistance needs to come last - convert to SON