Set correct direction arrow from order with NULLS extra parameter

Arrows direction icons in treeview are defined by ASC or DESC keywords. When
using an order with composed sentence eg. "DESC NULLS FIRST", we need to
extract first word to get arrow direction keyword.

issue9587
review296211002
This commit is contained in:
Maxime Richez committed 2020-09-22 10:18:39 +02:00
1 parent 12deead274
commit 2baa5cd154
1 file changed
+1
+1
View File
@@ -536,6 +536,7 @@ class ViewTree(View):
if order and len(order) == 1:
(name, direction), = order
if direction:
direction = direction.split(None, 1)[0]
direction = {
'ASC': common.IconFactory.get_pixbuf('tryton-arrow-down'),
'DESC': common.IconFactory.get_pixbuf('tryton-arrow-up'),