Commit af2aebe7 authored by Nicolas Delaby's avatar Nicolas Delaby

pass arguments when evaluate first_item field

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19857 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 587f5c10
......@@ -566,11 +566,13 @@ from Products.Formulator.Widget import SingleItemsWidget
def SingleItemsWidget_render_items(self, field, key, value, REQUEST):
# get items
items = field.get_value('items', REQUEST=REQUEST,
cell=getattr(REQUEST,'cell',None))
cell = getattr(REQUEST, 'cell', None)
items = field.get_value('items', REQUEST=REQUEST, cell=cell)
# check if we want to select first item
if not value and field.get_value('first_item') and len(items) > 0:
if not value and field.get_value('first_item',
REQUEST=REQUEST,
cell=cell) and len(items) > 0:
try:
text, value = items[0]
except ValueError:
......
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