changeset 5588f4742fb0 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=5588f4742fb0
description:
        Manage empty direction when updating arrows

        Since issue8880, the direction of order may be null.

        issue8974
        review284691003
diffstat:

 tryton/gui/window/view_form/view/list.py |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (19 lines):

diff -r 62ed8d1080c5 -r 5588f4742fb0 tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py  Mon Dec 30 14:26:14 2019 +0100
+++ b/tryton/gui/window/view_form/view/list.py  Thu Jan 09 22:35:55 2020 +0100
@@ -535,10 +535,11 @@
         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
 

Reply via email to