Commit 624acb85 authored by Kevin Deldycke's avatar Kevin Deldycke

Sorry my previous stupid patch was a bad-stupid patch. This one is my true-stupid patch.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8611 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d4bf4bfd
......@@ -2064,12 +2064,9 @@ class ListBoxHTMLRenderer(ListBoxRenderer):
method_id = self.field.get_value('page_template')
if method_id not in (None, ''):
try:
return aq_base(getattr(self.getContext(), method_id)).__of__(context)
return getattr(context, method_id)
except AttributeError:
page_template = getattr( context.getPortalObject()
, method_id
)
return page_template.__of__(context)
return getattr(context.getPortalObject(), method_id).__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