Ticket #13159: quote_aggregate_alias_orderby.patch

File quote_aggregate_alias_orderby.patch, 552 bytes (added by David Elias, 9 years ago)
  • compiler.py

     
    327327                continue
    328328            col, order = get_order_dir(field, asc)
    329329            if col in self.query.aggregate_select:
    330                 result.append('%s %s' % (col, order))
     330                result.append('%s %s' % (qn(col), order))
    331331                continue
    332332            if '.' in field:
    333333                # This came in through an extra(order_by=...) addition. Pass it
Back to Top