From 894678da394bedbdcabadabf59fd5698ebd222c1 Mon Sep 17 00:00:00 2001 From: Stefan Wojcik Date: Mon, 5 Dec 2016 00:03:19 -0500 Subject: [PATCH] minor comments --- mongoengine/queryset/queryset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongoengine/queryset/queryset.py b/mongoengine/queryset/queryset.py index a4b9c222..b185b340 100644 --- a/mongoengine/queryset/queryset.py +++ b/mongoengine/queryset/queryset.py @@ -44,10 +44,11 @@ class QuerySet(BaseQuerySet): if self._len is not None: return self._len + # Populate the result cache with *all* of the docs in the cursor if self._has_more: - # populate the cache list(self._iter_results()) + # Cache the length of the complete result cache and return it self._len = len(self._result_cache) return self._len