[Zope] reindex_object() in a python script??

Mark A. Lilly marq@europa.com
Fri, 5 Apr 2002 14:41:55 -0800


Hi,
I create an Object instance in a python script, and then change two of the
properties. (see below).  Even though i'm calling reindex_object, after the
Task object is added to the Folder, it is not in the ZCatalog TaskCatalog
until i manually add it. The Task's ZClass (task) is CatalogAware.

Thoughts?
Thanks,
mark



folder2 = getattr(context, 'Tasks')
id = context.ZopeTime().strftime('%Y%m%d%H%M%S')
theProject=folder2.manage_addProduct['Task'].task.createInObjectManager(id,
context.REQUEST)

theProject.propertysheets.primary.manage_changeProperties(task_desc=REQUEST.
input_desc)
theProject.propertysheets.primary.manage_changeProperties(task_name=REQUEST.
input_name)
theProject.propertysheets.primary.manage_changeProperties(project_id=REQUEST
.input_project_id)

theProject.reindex_object()