yuppie wrote:
> 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
> IndexableObjectWrapper?

Fixed the issue this way:

- reverted r130422

- adjusted the IndexableObjectWrapper

I guess other indexed attributes can also contain None. Not sure if
converting them to an empty string is always the best solution.



Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to