Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed an Oracle error on double negations in where conditions. Fixed …

…#7111

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit db6bab5cb385e53570ec768892d6882708d8feb4 1 parent 2061b3f
@ikelly ikelly authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 django/db/models/sql/where.py
View
6 django/db/models/sql/where.py
@@ -51,12 +51,12 @@ def as_sql(self, node=None, qn=None):
format = '(%s)'
elif isinstance(child, tree.Node):
sql, params = self.as_sql(child, qn)
- if len(child.children) == 1:
+ if child.negated:
+ format = 'NOT (%s)'
+ elif len(child.children) == 1:
format = '%s'
else:
format = '(%s)'
- if child.negated:
- format = 'NOT %s' % format
else:
sql, params = self.make_atom(child, qn)
format = '%s'
Please sign in to comment.
Something went wrong with that request. Please try again.