Manage empty direction when updating arrows

Since issue8880, the direction of order may be null.

issue8974
review284691003
This commit is contained in:
Cédric Krier
2020-01-09 22:35:55 +01:00
parent ae44737828
commit fac74df68b
+5 -4
View File
@@ -535,10 +535,11 @@ class ViewTree(View):
order = self.screen.order
if order and len(order) == 1:
(name, direction), = order
direction = {
'ASC': common.IconFactory.get_pixbuf('tryton-arrow-down'),
'DESC': common.IconFactory.get_pixbuf('tryton-arrow-up'),
}[direction]
if direction:
direction = {
'ASC': common.IconFactory.get_pixbuf('tryton-arrow-down'),
'DESC': common.IconFactory.get_pixbuf('tryton-arrow-up'),
}[direction]
else:
name, direction = None, None