Author: mtredinnick
Date: 2008-08-23 13:34:32 -0500 (Sat, 23 Aug 2008)
New Revision: 8499
Modified:
django/trunk/django/db/models/query.py
Log:
Removed a relatively pointless QuerySet clone introduced in [8472].
Modified: django/trunk/django/db/models/query.py
===================================================================
--- django/trunk/django/db/models/query.py 2008-08-23 18:28:52 UTC (rev
8498)
+++ django/trunk/django/db/models/query.py 2008-08-23 18:34:32 UTC (rev
8499)
@@ -617,10 +617,13 @@
be treated as a single filter. This is only important when it comes to
determining when to reuse tables for many-to-many filters. Required so
that we can filter naturally on the results of related managers.
+
+ This doesn't return a clone of the current QuerySet (it returns
+ "self"). The method is only used internally and should be immediately
+ followed by a filter() that does create a clone.
"""
- obj = self._clone()
- obj._sticky_filter = True
- return obj
+ self._sticky_filter = True
+ return self
def _merge_sanity_check(self, other):
"""
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---