changeset 56895fdef799 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=56895fdef799
description:
        Test if integer dict widget value is not None before converting it

        issue10167
        review340211002
diffstat:

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

diffs (14 lines):

diff -r b739c7c6a470 -r 56895fdef799 
tryton/gui/window/view_form/view/form_gtk/dictionary.py
--- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py   Sun Mar 07 
19:07:53 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