in DataForm, a field of type 'list-single' can have no <value> element. Create a default one in such a case to prevent TB

This commit is contained in:
Yann Leboulanger 2006-01-03 18:17:43 +00:00
parent 5f3ceb5766
commit 8e3d85c746
1 changed files with 2 additions and 0 deletions

View File

@ -1245,6 +1245,8 @@ class Connection:
for tag in tags:
dic[i]['options'][j]['values'].append(tag.getData())
j += 1
if not dic[i].has_key('values'):
dic[i]['values'] = [dic[i]['options'][0]['values'][0]]
i += 1
return dic