Commit 4d16fe7f authored by Yoshinori Okuji's avatar Yoshinori Okuji

Generate methods for a portal type safely.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2243 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5909e2ea
......@@ -626,7 +626,10 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
# Try to get a portal_type property (Implementation Dependent)
global aq_portal_type
if not aq_portal_type.has_key(self.portal_type):
self._aq_dynamic()
try:
self._aq_dynamic(accessor_name)
except AttributeError:
pass
if hasattr(aq_portal_type[self.portal_type], accessor_name):
method = getattr(self, accessor_name)
return method(**kw)
......
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