diff options
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 2e3169a3c0..9e67e9a993 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -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)) |
