Skip to content
Snippets Groups Projects
Commit a76f6b01 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

show value in dataforms if there is no label

parent b68a7a94
No related branches found
No related tags found
No related merge requests found
......@@ -247,7 +247,10 @@ class ListField(DataField):
for element in self.iterTags('option'):
v = element.getTagData('value')
if v is None: raise WrongFieldValue
yield (v, element.getAttr('label'))
l = element.getAttr('label')
if not l:
l = v
yield (v, l)
class ListSingleField(ListField, StringField):
'''Covers list-single and jid-single fields.'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment