You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Selecting a list value fails in mongomock, while succeeding in MongoDB #90
For example, the following queries will not return anything:
{'list_value':[] }
{'list_value' : ['abc']}
when the doc is {'list_value':['abc']}
Proposed fix:
Change the following block in filtering.py:
elif isinstance(doc_val, (list, tuple)):
if isinstance(search, ObjectId):
is_match = (search in doc_val or str(search) in doc_val)
else:
is_match = search in doc_val
To:
elif isinstance(doc_val, (list, tuple)):
if isinstance(search, ObjectId):
is_match = (search in doc_val or str(search) in doc_val or search == doc_val)
else:
is_match = (search in doc_val or search == doc_val)
Activity
Fix + test for mongomock#90
Merge pull request #91 from baruchoxman/master
baruchoxman commentedon Jul 21, 2015
Fixed