Skip to content

Commit 856fa0e

Browse files
committed
Merge pull request #159 from rochacbruno/master
Fix #153 privar() return None when attr is not found
2 parents dfac8cc + dc1613f commit 856fa0e

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)