From 6944988b913d2baebba26fed5b75f91c9446b716 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 21 Jun 2021 13:58:09 +0800 Subject: [PATCH] bugfix --- kivyblocks/widgetExt/inputext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kivyblocks/widgetExt/inputext.py b/kivyblocks/widgetExt/inputext.py index e95a87c..10f23a7 100755 --- a/kivyblocks/widgetExt/inputext.py +++ b/kivyblocks/widgetExt/inputext.py @@ -171,15 +171,15 @@ class MyDropDown(DropDown): def getTextByValue(self,v): for d in self.si_data: - if d[self.valueField] == v: - r = d[self.textField] + if d.get(self.valueField) == v: + r = d.get(self.textField) return r if r else v return str(v) def getValueByText(self,v): for d in self.si_data: - if d[self.textField] == v: - r = d[self.valueField] + if d.get(self.textField) == v: + r = d.get(self.valueField) return r return ''