Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.2.X] Fixed #15283 -- Made a minor performance tweak to __iter__. T…

…hanks to lanyjie for the report.

Backport of r15491 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f8ff9fee2bfa88f70b388e99e79fca2103f6c1db 1 parent 54987dd
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/query.py
View
2  django/db/models/query.py
@@ -79,7 +79,7 @@ def __len__(self):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.