Commit e26f2cad authored by Romain Courteaud's avatar Romain Courteaud

Revert "ZODB Components: When migrating FS Mixin, set the ZODB Component...

Revert "ZODB Components: When migrating FS Mixin, set the ZODB Component reference to the class name (like Interfaces)."

This reverts commit 2b8c6305.
parent cdb6a68a
...@@ -6633,33 +6633,6 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -6633,33 +6633,6 @@ Business Template is a set of definitions, such as skins, portal types and categ
continue continue
subsubmodule_name = interface_class_name subsubmodule_name = interface_class_name
# TODO-arnau: Refactor with 'Interface Component'
elif component_portal_type == 'Mixin Component':
try:
mixin_module = __import__(source_reference, {}, {}, source_reference)
except ImportError, e:
LOG("BusinessTemplate", WARNING,
"Skipping %s: Cannot be imported (%s)" % (filepath, e))
continue
mixin_class_name = None
for _, m in inspect.getmembers(mixin_module, inspect.isclass):
if (m.__name__.endswith('Mixin') and
# Local definition only
m.__module__ == mixin_module.__name__):
if mixin_class_name is not None:
# Do not try to be clever, just let the developer fix the problem
LOG("BusinessTemplate", WARNING,
"Skipping %s: More than one Mixin defined" % filepath)
mixin_class_name = None
break
else:
mixin_class_name = m.__name__
if mixin_class_name is None:
continue
subsubmodule_name = mixin_class_name
obj = __newTempComponent(portal_type=subsubmodule_portal_type, obj = __newTempComponent(portal_type=subsubmodule_portal_type,
reference=subsubmodule_name, reference=subsubmodule_name,
......
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