Ticket #7302: 7302.diff
File 7302.diff, 651 bytes (added by , 16 years ago) |
---|
-
django/db/models/sql/query.py
601 601 # on verbatim. 602 602 col, order = get_order_dir(field, asc) 603 603 table, col = col.split('.', 1) 604 elt = '%s.%s' % (qn(table), col)604 elt = '%s.%s' % (qn(table), qn2(col)) 605 605 if not distinct or elt in select_aliases: 606 606 result.append('%s %s' % (elt, order)) 607 607 elif get_order_dir(field)[0] not in self.extra_select: