Commit 8f4534fa authored by Yoshinori Okuji's avatar Yoshinori Okuji

unindexObject may be called with a copy of an object stored in a business...

unindexObject may be called with a copy of an object stored in a business template. In this case, this copy is not connected to a portal, so calling getPortalObject is not safe.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30680 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90129456
No related merge requests found
......@@ -348,7 +348,7 @@ class CopyContainer:
Unindex the object from the portal catalog.
"""
if self.isIndexable:
catalog = getToolByName(self.getPortalObject(), 'portal_catalog', None)
catalog = getToolByName(self, 'portal_catalog', None)
if catalog is not None:
# Make sure there is not activity for this object
self.flushActivity(invoke=0)
......
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