Author: russellm
Date: 2010-07-29 23:06:27 -0500 (Thu, 29 Jul 2010)
New Revision: 13456
Modified:
django/trunk/django/db/models/sql/query.py
Log:
Fixed #13882 -- Removed an unnecessary nested where clause introduced on
__isnull queries. Thanks to Alex Gaynor for the report and patch.
Modified: django/trunk/django/db/models/sql/query.py
===================================================================
--- django/trunk/django/db/models/sql/query.py 2010-07-30 03:49:58 UTC (rev
13455)
+++ django/trunk/django/db/models/sql/query.py 2010-07-30 04:06:27 UTC (rev
13456)
@@ -1090,10 +1090,7 @@
# exclude the "foo__in=[]" case from this handling, because
# it's short-circuited in the Where class.
# We also need to handle the case where a subquery is
provided
- entry = self.where_class()
- entry.add((Constraint(alias, col, None), 'isnull', True),
AND)
- entry.negate()
- self.where.add(entry, AND)
+ self.where.add((Constraint(alias, col, None), 'isnull',
False), AND)
if can_reuse is not None:
can_reuse.update(join_list)
--
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.