We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd5b44d commit 0fe5c0aCopy full SHA for 0fe5c0a
src/yafowil/select.py
@@ -248,7 +248,11 @@ def select_display_renderer(widget, data):
248
if not value:
249
value = u''
250
multivalued = attr_value('multivalued', widget, data)
251
- vocab = dict(attr_value('vocabulary', widget, data, []))
+ vocab = attr_value('vocabulary', widget, data, [])
252
+ # fallback for list of strings
253
+ if type(vocab) == list and all(isinstance(item, str) for item in vocab):
254
+ vocab = enumerate(vocab)
255
+ vocab = dict(vocab)
256
if not multivalued or not value:
257
value = vocab.get(value, value)
258
0 commit comments