Ticket #10160: 10160.diff
File 10160.diff, 1.3 KB (added by , 16 years ago) |
---|
-
django/db/models/sql/where.py
160 160 extra = '' 161 161 162 162 if lookup_type in connection.operators: 163 format = "%s %%s %s" % (connection.ops.lookup_cast(lookup_type), 164 extra) 163 format = "%s %%s %%s" % (connection.ops.lookup_cast(lookup_type),) 165 164 return (format % (field_sql, 166 connection.operators[lookup_type] % cast_sql), params) 165 connection.operators[lookup_type] % cast_sql, 166 extra), params) 167 167 168 168 if lookup_type == 'in': 169 169 if not value_annot: -
django/db/models/sql/expressions.py
67 67 try: 68 68 sql, params = qn(child), () 69 69 except: 70 sql, params = str(child), ()70 sql, params = '%s', (child,) 71 71 72 72 if hasattr(child, 'children') > 1: 73 73 format = '(%s)'