Browse files

Merge pull request #53 from tuffnatty/order_by_desc

Fixed ORDER BY ... DESC support
  • Loading branch information...
2 parents 3924b64 + f6e20ce commit be8b28de5bc67cf527ae5bcb183bffe5a91a41db @versae committed May 13, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 django_qbe/forms.py
View
2 django_qbe/forms.py
@@ -215,7 +215,7 @@ def get_query_parts(self):
if alias is not None and not is_join:
aliases.append(alias)
if sort:
- sorts.append(db_field)
+ sorts.append(db_field + ('' if sort == 'asc' else ' DESC'))
if group_by:
groups_by.append(db_field)
if all(criteria):

0 comments on commit be8b28d

Please sign in to comment.