Django

Code

Changeset 2257

Show
Ignore:
Timestamp:
02/03/06 17:30:56 (3 years ago)
Author:
adrian
Message:

magic-removal: Improved QOperator.get_sql() to NOT output parenthesis in where clause if there is no where clause

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/db/models/query.py

    r2250 r2257  
    452452            where.extend(where2) 
    453453            params.extend(params2) 
    454         return tables, joins, ['(%s)' % self.operator.join(where)], params 
     454        if where: 
     455            return tables, joins, ['(%s)' % self.operator.join(where)], params 
     456        return tables, joins, [], params 
    455457 
    456458class QAnd(QOperator):