vocabulary: handle integer and string tokens as equivalent
This commit is contained in:
parent
90466aad79
commit
5a6111acb7
2 changed files with 3 additions and 4 deletions
|
@ -93,7 +93,7 @@ class VocabularyField(Field):
|
||||||
return value
|
return value
|
||||||
items = self.getVocabularyItems(row)
|
items = self.getVocabularyItems(row)
|
||||||
for item in items:
|
for item in items:
|
||||||
if item['token'] == value:
|
if str(item['token']) == str(value):
|
||||||
return item['title']
|
return item['title']
|
||||||
|
|
||||||
def getVocabularyItems(self, row):
|
def getVocabularyItems(self, row):
|
||||||
|
|
|
@ -280,9 +280,8 @@ We can now access the report using a results view.
|
||||||
... for col in resultsView.displayedColumns:
|
... for col in resultsView.displayedColumns:
|
||||||
... print col.getDisplayValue(row),
|
... print col.getDisplayValue(row),
|
||||||
... print
|
... print
|
||||||
{'url': 'http://127.0.0.1/loops/views/home/.36', 'title': u'loops Development'} []
|
{'url': 'http://127.0.0.1/loops/views/home/.36', 'title': u'loops Development'}
|
||||||
|
<cybertools.composer.report.result.ResultSet object ...>
|
||||||
<cybertools.composer.report.result.ResultSet object ...>
|
|
||||||
|
|
||||||
|
|
||||||
Fin de partie
|
Fin de partie
|
||||||
|
|
Loading…
Add table
Reference in a new issue