1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #7302: Corrected quoting of columns in extra_group_by. Thanks to Ivan Sagalaev for the patch and initial test.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2008-09-01 12:07:26 +00:00
parent 823263429f
commit f55b834c2f
3 changed files with 26 additions and 1 deletions

View File

@@ -629,7 +629,7 @@ class Query(object):
result.append('%s %s' % (elt, order))
else:
col, order = get_order_dir(field, asc)
elt = qn(col)
elt = qn2(col)
if distinct and elt not in select_aliases:
ordering_aliases.append(elt)
result.append('%s %s' % (elt, order))