vocabulary: handle integer and string tokens as equivalent

This commit is contained in:
Helmut Merz 2012-03-17 16:53:42 +01:00
parent 90466aad79
commit 5a6111acb7
2 changed files with 3 additions and 4 deletions

View file

@ -93,7 +93,7 @@ class VocabularyField(Field):
return value
items = self.getVocabularyItems(row)
for item in items:
if item['token'] == value:
if str(item['token']) == str(value):
return item['title']
def getVocabularyItems(self, row):

View file

@ -280,8 +280,7 @@ We can now access the report using a results view.
... for col in resultsView.displayedColumns:
... print col.getDisplayValue(row),
... 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 ...>