bugfix
This commit is contained in:
parent
dd56841bc9
commit
f594975508
@ -172,13 +172,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[self.valueField] == v:
|
||||||
return d[self.textField]
|
r = d[self.textField]
|
||||||
|
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[self.textField] == v:
|
||||||
return d[self.valueField]
|
r = d[self.valueField]
|
||||||
|
return r
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def setData(self,data):
|
def setData(self,data):
|
||||||
|
Loading…
Reference in New Issue
Block a user