[Zope-CMF] DynamicType.portal_type

yuppie y.2014 at wcm-solutions.de
Thu Nov 6 13:24:50 CET 2014


http://svn.zope.org/?view=rev&revision=130422 changes the default value
of DynamicType.portal_type from None to an empty string.

getPortalTypeName returns this value and the interface still says:

    def getPortalTypeName():
        """ Return the name of the type information for this object.

        o If the object is uninitialized, return None.

        o Permission:  Public

In several places the code relies on this and checks for None.

There is no test that shows what was broken and fixed. AFAICS there is
nothing wrong with using None for uninitialized objects. We just have a
new requirement in Products.ZCatalog 3: Attributes with None values can
no longer be indexed.

Wouldn't it be better to adjust the portal_type just for indexing in the



More information about the Zope-CMF mailing list