Commit 22c26d19 authored by Sebastien Robin's avatar Sebastien Robin

check if there is listbox_key


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@712 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 207b4ca5
......@@ -3,14 +3,19 @@
from string import zfill
request = context.REQUEST
from string import zfill
for k in kw.keys():
v = kw[k]
if k == 'listbox':
listbox = {}
if k == 'listbox_lines':
if v is not None:
i = 1
for line in v:
#key = '_%s' % zfill(i,3)
key = '_%s' % line['listbox_key']
if line.has_key('listbox_key'):
key = '%s' % line['listbox_key']
else:
key = str(zfill(i,3))
listbox[key] = line
i+=1
request.set('listbox',listbox)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment