Fixes bug using positional operator to update embedded documents.

append_field wasn't getting reset to True in the loop, so fields wouldn't
get appended to clean_fields after str was encountered

[#354]
This commit is contained in:
Adam Parrish
2011-11-10 12:03:51 -08:00
committed by Ross Lawley
parent 5aeee9deb2
commit 34646a414c
4 changed files with 31 additions and 1 deletions

View File

@@ -1276,8 +1276,8 @@ class QuerySet(object):
parts = []
cleaned_fields = []
append_field = True
for field in fields:
append_field = True
if isinstance(field, str):
# Convert the S operator to $
if field == 'S':