def moveObjectsByDelta(self, ids, delta, subset_ids=None, suppress_events=False):
    res = self._old_moveObjectsByDelta(ids, delta, subset_ids=subset_ids, suppress_events=suppress_events)
    es = ElasticSearchCatalog(api.portal.get_tool("portal_catalog"))
    if es.enabled:
        if subset_ids is None:
            subset_ids = self.idsInOrder()
        hook.index_positions(self.context, subset_ids)
    return res
def PloneSite_moveObjectsByDelta(self, ids, delta, subset_ids=None, suppress_events=False):
    res = self._old_moveObjectsByDelta(ids, delta, subset_ids=subset_ids, suppress_events=suppress_events)
    es = ElasticSearchCatalog(api.portal.get_tool("portal_catalog"))
    if es.enabled:
        if subset_ids is None:
            objects = list(self._objects)
            subset_ids = self.getIdsSubset(objects)
        hook.index_positions(self, subset_ids)
    return res
Beispiel #3
0
def moveObjectsByDelta(self,
                       ids,
                       delta,
                       subset_ids=None,
                       suppress_events=False):
    res = self._old_moveObjectsByDelta(ids,
                                       delta,
                                       subset_ids=subset_ids,
                                       suppress_events=suppress_events)
    es = ElasticSearchCatalog(api.portal.get_tool('portal_catalog'))
    if es.enabled:
        if subset_ids is None:
            subset_ids = self.idsInOrder()
        hook.index_positions(self.context, subset_ids)
    return res
Beispiel #4
0
def PloneSite_moveObjectsByDelta(self,
                                 ids,
                                 delta,
                                 subset_ids=None,
                                 suppress_events=False):
    res = self._old_moveObjectsByDelta(ids,
                                       delta,
                                       subset_ids=subset_ids,
                                       suppress_events=suppress_events)
    es = ElasticSearchCatalog(api.portal.get_tool('portal_catalog'))
    if es.enabled:
        if subset_ids is None:
            objects = list(self._objects)
            subset_ids = self.getIdsSubset(objects)
        hook.index_positions(self, subset_ids)
    return res