Commit 544b2559 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Migration dialog: Only consider Portal Type Document/Tool...

ZODB Components: Migration dialog: Only consider Portal Type Document/Tool class and not all its subclasses.

This makes it easier to migrate only Document/Tool classes to the current bt5,
considering that subclasses below are likely to be used in several places.
parent 617258d9
Pipeline #8706 failed with stage
......@@ -6437,19 +6437,23 @@ Business Template is a set of definitions, such as skins, portal types and categ
error=True)
continue
for cls in (tuple(zope.interface.implementedBy(portal_type_cls)) +
portal_type_cls.mro()):
for i, cls in enumerate((portal_type_cls.mro() +
tuple(zope.interface.implementedBy(portal_type_cls)))):
if cls in seen_cls_set:
continue
seen_cls_set.add(cls)
cls_module_filepath = self._checkFilesystemModulePath(
inspect.getmodule(cls),
working_copy_path_list)
if cls_module_filepath is not None:
cls_module_name = cls.__module__
if '.Document.' in cls_module_name or '.Tool.' in cls_module_name:
if i != 1:
continue
yield cls.__name__, cls.__module__, cls_module_filepath
seen_cls_set.add(cls)
security.declareProtected(Permissions.ManagePortal,
'getMigratableSourceCodeFromFilesystemList')
def getMigratableSourceCodeFromFilesystemList(self,
......
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