Skip to content

Commit d9dd375

Browse files
committed
Merge branch 'master' of github.com:bunnyxt/mongoengine into update_operator_name_field
2 parents 53a6693 + c08ec71 commit d9dd375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongoengine/queryset/transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def update(_doc_cls=None, **update):
264264
op = operator_map.get(op, op)
265265

266266
match = None
267-
if parts[-1] in COMPARISON_OPERATORS:
267+
if len(parts) > 1 and parts[-1] in COMPARISON_OPERATORS:
268268
match = parts.pop()
269269

270270
# Allow to escape operator-like field name by __

0 commit comments

Comments
 (0)