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:
Ian Kelly 2008-04-29 20:55:10 +00:00
parent 2061b3f3ca
commit db6bab5cb3
1 changed files with 3 additions and 3 deletions

View File

@ -51,12 +51,12 @@ class WhereNode(tree.Node):
format = '(%s)' format = '(%s)'
elif isinstance(child, tree.Node): elif isinstance(child, tree.Node):
sql, params = self.as_sql(child, qn) 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' format = '%s'
else: else:
format = '(%s)' format = '(%s)'
if child.negated:
format = 'NOT %s' % format
else: else:
sql, params = self.make_atom(child, qn) sql, params = self.make_atom(child, qn)
format = '%s' format = '%s'