From 3c69470be2fc456255e266de1ef9ff98cb917965 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 4 Jan 2006 16:03:42 +0000 Subject: [PATCH] handle correctly unlabeled option values in DataForms --- src/common/connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 123d04f3d..fa693eb32 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1238,13 +1238,14 @@ class Connection: for option_tag in option_tags: dic[i]['options'][j] = {} label = option_tag.getAttr('label') - if label: - dic[i]['options'][j]['label'] = label tags = option_tag.getTags('value') dic[i]['options'][j]['values'] = [] for tag in tags: dic[i]['options'][j]['values'].append(tag.getData()) j += 1 + if not label: + label = dic[i]['options'][j]['values'][0] + dic[i]['options'][j]['label'] = label if not dic[i].has_key('values'): dic[i]['values'] = [dic[i]['options'][0]['values'][0]] i += 1