Skip to content

Commit dc1613f

Browse files
committed
Fix #153 privar() return None when attr is not found
1 parent dfac8cc commit dc1613f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_mongoengine/operation_tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _remove(collection_self, spec_or_id, safe=None, **kwargs):
133133
def _cursor_refresh(cursor_self):
134134
# Look up __ private instance variables
135135
def privar(name):
136-
return getattr(cursor_self, '_Cursor__{0}'.format(name))
136+
return getattr(cursor_self, '_Cursor__{0}'.format(name), None)
137137

138138
if privar('id') is not None:
139139
# getMore not query - move on

0 commit comments

Comments
 (0)