vocabulary: handle integer and string tokens as equivalent

This commit is contained in:
Helmut Merz 2012-03-17 16:52:14 +01:00
parent 7483763564
commit c50e7f07d3

View file

@ -400,7 +400,7 @@ class DropdownFieldInstance(FieldInstance):
def display(self, value):
items = self.context.getVocabularyItems(self.clientInstance, self.request)
for item in items:
if item['token'] == value:
if str(item['token']) == str(value):
return item['title']
return value