Commit a77601e9 authored by Julien Muchembled's avatar Julien Muchembled

Make Base.getTypeBasedMethod stop considering meta type as prefix.

Use of meta types is deprecated. Ignoring them makes it possible to optimize
getTypeBasedMethod thanks to portal types as classes.
parent d70587e3
......@@ -2961,12 +2961,10 @@ class Base( CopyContainer,
try:
script = type_base_cache[cache_key]
except KeyError:
class_name_list = [portal_type, self.getMetaType()] + \
[base_class.__name__ for base_class in self.__class__.mro()
if issubclass(base_class, Base)]
script_name_end = '_' + method_id
for script_name_begin in class_name_list:
script_id = script_name_begin.replace(' ','') + script_name_end
for base_class in self.__class__.mro():
if issubclass(base_class, Base):
script_id = base_class.__name__.replace(' ','') + script_name_end
script = getattr(self, script_id, None)
if script is not None:
type_base_cache[cache_key] = aq_inner(script)
......
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