Add support to transform. Add pull tests for and .

This commit is contained in:
Agustin Barto
2019-05-17 13:41:02 -03:00
parent 58b0b18ddd
commit b392e3102e
2 changed files with 11 additions and 6 deletions

View File

@@ -281,7 +281,7 @@ def update(_doc_cls=None, **update):
if op == 'pull':
if field.required or value is not None:
if match == 'in' and not isinstance(value, dict):
if match in ('in', 'nin') and not isinstance(value, dict):
value = _prepare_query_for_iterable(field, op, value)
else:
value = field.prepare_query_value(op, value)