Commit 5d0577de authored by Yoshinori Okuji's avatar Yoshinori Okuji

Fasten _aq_dynamic a bit.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17067 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dec0949a
...@@ -746,17 +746,11 @@ class Base( CopyContainer, ...@@ -746,17 +746,11 @@ class Base( CopyContainer,
# If this is a portal_type property and everything is already defined # If this is a portal_type property and everything is already defined
# for that portal_type, try to return a value ASAP # for that portal_type, try to return a value ASAP
if ptype in Base.aq_portal_type: try:
accessor = getattr(Base.aq_portal_type[ptype], id, None) return getattr(Base.aq_portal_type[ptype], id, None)
if accessor is not None: except KeyError:
# Clearly this below has a bad effect in CMFCategory. if id.startswith('portal_'):
# Someone must investigate why. -yo return None
#return accessor.__of__(self) # XXX - JPS: I have no idea if we should __of__ before returning
return accessor
return None
elif id in ('portal_types', 'portal_url', 'portal_workflow'):
# This is required to precent infinite loop (we need to access portal_types tool)
return None
# Proceed with property generation # Proceed with property generation
klass = self.__class__ klass = self.__class__
......
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