changeset 35320a97fcf1 in tryton:5.8
details: https://hg.tryton.org/tryton?cmd=changeset&node=35320a97fcf1
description:
        Test if integer dict widget value is not None before converting it

        issue10167
        review340211002
        (grafted from 56895fdef799554381c53231925e1d19bc970f41)
diffstat:

 tryton/gui/window/view_form/view/form_gtk/dictionary.py |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 2a7fa16f706f -r 35320a97fcf1 
tryton/gui/window/view_form/view/form_gtk/dictionary.py
--- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py   Mon Mar 01 
23:30:23 2021 +0100
+++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py   Thu Mar 11 
09:15:14 2021 +0100
@@ -234,7 +234,9 @@
         return widget
 
     def get_value(self):
-        return int(self.widget.value)
+        if self.widget.value is not None:
+            return int(self.widget.value)
+        return None
 
     def set_value(self, value):
         if value is not None:

Reply via email to