From 8e3d85c746a80ffe20784f0ce3b0f8fe99049a96 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 3 Jan 2006 18:17:43 +0000 Subject: [PATCH] in DataForm, a field of type 'list-single' can have no element. Create a default one in such a case to prevent TB --- src/common/connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/connection.py b/src/common/connection.py index 2010d7a20..123d04f3d 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -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