8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-26 06:32:26 +00:00

Ne trie le queryset que si c'est lui qui est concerné

This commit is contained in:
Maël Kervella 2017-11-02 00:27:31 +00:00
parent 742d905e83
commit ea7292c023

View file

@ -248,7 +248,7 @@ class SortTable:
if not fields:
fields = values.get('default', [])
request = request.order_by(*fields)
if order == 'desc':
if values.get(col, None) and order == 'desc':
return request.reverse()
else:
return request