Commit f5ed7657 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Get the type and check the identity with tuple, instead of using isinstance,...

Get the type and check the identity with tuple, instead of using isinstance, because isinstance is slower, when accessor is not of tuple, and there is no reason to check subclass instances here.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18647 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed64bb41
......@@ -846,7 +846,7 @@ class Base( CopyContainer,
try:
property_holder = Base.aq_portal_type[aq_key]
accessor = getattr(property_holder, id, None)
if isinstance(accessor, tuple):
if type(accessor) is tuple:
if id not in RESERVED_TUPLE_PROPERTY:
property_holder.createAccessor(id)
accessor = getattr(property_holder, id, None)
......
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