From 337a6bc0f61fd3f72f1e2cacbb3bb5821028e44f Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 12 Feb 2011 05:23:41 +0000 Subject: [PATCH] Fixed #15283 -- Made a minor performance tweak to __iter__. Thanks to lanyjie for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15491 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/query.py b/django/db/models/query.py index fa3971bc48..324554eb78 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -81,7 +81,7 @@ class QuerySet(object): else: self._result_cache = list(self.iterator()) elif self._iter: - self._result_cache.extend(list(self._iter)) + self._result_cache.extend(self._iter) return len(self._result_cache) def __iter__(self):