mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #7759 -- Fixed QuerySet.count() when the results cache was only partially
populated. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -830,5 +830,13 @@ another cursor.
|
||||
... obj.save()
|
||||
... if i > 10: break
|
||||
|
||||
Bug #7759 -- count should work with a partially read result set.
|
||||
>>> count = Number.objects.count()
|
||||
>>> qs = Number.objects.all()
|
||||
>>> for obj in qs:
|
||||
... qs.count() == count
|
||||
... break
|
||||
True
|
||||
|
||||
"""}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user