mirror of
https://github.com/django/django.git
synced 2025-07-27 23:24:14 +00:00
Fixed #13159 -- properly quote aggregates in order_by.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15318 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
91414c4bb8
commit
80287f1e8a
2 changed files with 14 additions and 1 deletions
|
@ -330,7 +330,7 @@ class SQLCompiler(object):
|
|||
continue
|
||||
col, order = get_order_dir(field, asc)
|
||||
if col in self.query.aggregate_select:
|
||||
result.append('%s %s' % (col, order))
|
||||
result.append('%s %s' % (qn(col), order))
|
||||
continue
|
||||
if '.' in field:
|
||||
# This came in through an extra(order_by=...) addition. Pass it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue