magic-removal: Improved QOperator.get_sql() to NOT output parenthesis in where clause if there is no where clause
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a624c77cc1
commit
eee4f00bfb
|
@ -451,7 +451,9 @@ class QOperator:
|
|||
joins.update(joins2)
|
||||
where.extend(where2)
|
||||
params.extend(params2)
|
||||
return tables, joins, ['(%s)' % self.operator.join(where)], params
|
||||
if where:
|
||||
return tables, joins, ['(%s)' % self.operator.join(where)], params
|
||||
return tables, joins, [], params
|
||||
|
||||
class QAnd(QOperator):
|
||||
"Encapsulates a combined query that uses 'AND'."
|
||||
|
|
Loading…
Reference in New Issue