plone.app.discussion/plone/app/discussion/subscribers.py
Gil Forcada f217a42932
index/reindex/unindex the object itself
Do not defer to p.a.discussion own tool.

That's needed so that collective.indexing can patch comments,
so in turn can be indexed by Solr.
2019-03-21 08:57:08 +01:00

15 lines
340 B
Python

# -*- coding: utf-8 -*-
from Products.CMFCore.utils import getToolByName
def index_object(obj, event):
"""Index the object when it is added/modified to the conversation.
"""
obj.indexObject()
def unindex_object(obj, event):
"""Unindex the object when it is removed from the conversation.
"""
obj.unindexObject()