Commit d4bf4bfd authored by Kevin Deldycke's avatar Kevin Deldycke

A stupid patch to partially correct bug #389

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8610 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a6d257e2
......@@ -2062,7 +2062,14 @@ class ListBoxHTMLRenderer(ListBoxRenderer):
# If a specific template is specified, use it.
method_id = self.field.get_value('page_template')
if method_id:
if method_id not in (None, ''):
try:
return aq_base(getattr(self.getContext(), method_id)).__of__(context)
except AttributeError:
page_template = getattr( context.getPortalObject()
, method_id
)
return page_template.__of__(context)
return aq_base(getattr(self.getContext(), method_id)).__of__(context)
# Otherwise, use the default one.
......
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