[Zope-CMF] Problem: addIndex with type as string
Jean Jordaan
jean@upfrontsystems.co.za
Fri, 01 Nov 2002 02:03:28 +0200
Hmm, looks like Plone (well, CMFTypes) specifies the type of index
as a string, when adding indexes to the 'portal_catalog'::
catalog.addIndex('UID', 'FieldIndex', extra=None)
But Zope 2.6 (and I think 2.5.x too) doesn't like that::
TypeError: Catalog addIndex now requires the index type to
be resolved prior to adding; create the proper
index in the caller.
(from the event.log). Looks like CMF also does this, at least in
CMFCore/CatalogTool.py::
for index_name, index_type in self.enumerateIndexes():
addIndex( index_name, index_type )
where 'index_name, index_type' are both strings.
http://plone.org/collector/539
http://collector.zope.org/CMF/86
--
Jean Jordaan
http://www.upfrontsystems.co.za