bugfix
This commit is contained in:
parent
f594975508
commit
6944988b91
@ -171,15 +171,15 @@ class MyDropDown(DropDown):
|
|||||||
|
|
||||||
def getTextByValue(self,v):
|
def getTextByValue(self,v):
|
||||||
for d in self.si_data:
|
for d in self.si_data:
|
||||||
if d[self.valueField] == v:
|
if d.get(self.valueField) == v:
|
||||||
r = d[self.textField]
|
r = d.get(self.textField)
|
||||||
return r if r else v
|
return r if r else v
|
||||||
return str(v)
|
return str(v)
|
||||||
|
|
||||||
def getValueByText(self,v):
|
def getValueByText(self,v):
|
||||||
for d in self.si_data:
|
for d in self.si_data:
|
||||||
if d[self.textField] == v:
|
if d.get(self.textField) == v:
|
||||||
r = d[self.valueField]
|
r = d.get(self.valueField)
|
||||||
return r
|
return r
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user