mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
2061b3f3ca
commit
db6bab5cb3
|
@ -51,12 +51,12 @@ class WhereNode(tree.Node):
|
|||
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'
|
||||
|
|
Loading…
Reference in New Issue