We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3c58c0 commit ccc1d20Copy full SHA for ccc1d20
pymongo/cursor.py
@@ -1159,9 +1159,9 @@ def next(self):
1159
"""Advance the cursor."""
1160
if self.__empty:
1161
raise StopIteration
1162
- db = self.__collection.database
1163
if len(self.__data) or self._refresh():
1164
if self.__manipulate:
+ db = self.__collection.database
1165
return db._fix_outgoing(self.__data.popleft(),
1166
self.__collection)
1167
else:
0 commit comments