solution for #949

This commit is contained in:
Eremeev Danil
2015-04-09 16:23:28 +05:00
parent c642eee0d2
commit 63d55cb797
2 changed files with 28 additions and 12 deletions

View File

@@ -44,6 +44,9 @@ def query(_doc_cls=None, _field_operation=False, **query):
if len(parts) > 1 and parts[-1] in MATCH_OPERATORS:
op = parts.pop()
if len(parts) > 1 and not parts[-1]:
parts.pop()
negate = False
if len(parts) > 1 and parts[-1] == 'not':
parts.pop()