Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed a relatively pointless QuerySet clone introduced in [8472].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aba518f0f8a20d343a0e2592fdbc7b97ee54006f 1 parent 1ec1257
Malcolm Tredinnick authored August 23, 2008

Showing 1 changed file with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  django/db/models/query.py
9  django/db/models/query.py
@@ -617,10 +617,13 @@ def _next_is_sticky(self):
617 617
         be treated as a single filter. This is only important when it comes to
618 618
         determining when to reuse tables for many-to-many filters. Required so
619 619
         that we can filter naturally on the results of related managers.
  620
+
  621
+        This doesn't return a clone of the current QuerySet (it returns
  622
+        "self"). The method is only used internally and should be immediately
  623
+        followed by a filter() that does create a clone.
620 624
         """
621  
-        obj = self._clone()
622  
-        obj._sticky_filter = True
623  
-        return obj
  625
+        self._sticky_filter = True
  626
+        return self
624 627
 
625 628
     def _merge_sanity_check(self, other):
626 629
         """

0 notes on commit aba518f

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