Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

queryset-refactor: Fixed a place where admin was poking about under t…

…he covers and I had moved the internal feature it was relying on.

git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7095 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 55cd02567099767ff9e48a8be24157db6a934ba0 1 parent 755bb2a
Malcolm Tredinnick authored February 08, 2008

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/contrib/admin/views/main.py
2  django/contrib/admin/views/main.py
@@ -627,7 +627,7 @@ def get_results(self, request):
627 627
         # Perform a slight optimization: Check to see whether any filters were
628 628
         # given. If not, use paginator.hits to calculate the number of objects,
629 629
         # because we've already done paginator.hits and the value is cached.
630  
-        if isinstance(self.query_set._filters, models.Q) and not self.query_set._filters.kwargs:
  630
+        if not self.query_set.query.where:
631 631
             full_result_count = result_count
632 632
         else:
633 633
             full_result_count = self.manager.count()

0 notes on commit 55cd025

Please sign in to comment.
Something went wrong with that request. Please try again.