Merge pull request #1769 from mindojo-victor/master

Fix deprecation warning for StopIteration
This commit is contained in:
erdenezul
2018-05-20 09:36:19 +08:00
committed by GitHub

View File

@@ -92,7 +92,7 @@ class QuerySet(BaseQuerySet):
# Raise StopIteration if we already established there were no more # Raise StopIteration if we already established there were no more
# docs in the db cursor. # docs in the db cursor.
if not self._has_more: if not self._has_more:
raise StopIteration return
# Otherwise, populate more of the cache and repeat. # Otherwise, populate more of the cache and repeat.
if len(self._result_cache) <= pos: if len(self._result_cache) <= pos: