Merge pull request #845 from aeroeng/andQ
mongo $and list should not contain list elements in order to avoid this ...
This commit is contained in:
commit
1cc7f80109
@ -160,7 +160,7 @@ def query(_doc_cls=None, _field_operation=False, **query):
|
||||
if isinstance(v, list):
|
||||
value = [{k: val} for val in v]
|
||||
if '$and' in mongo_query.keys():
|
||||
mongo_query['$and'].append(value)
|
||||
mongo_query['$and'].extend(value)
|
||||
else:
|
||||
mongo_query['$and'] = value
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user