# HG changeset patch # User Samuel Trégouët <samuel.tregouet@logilab.fr> # Date 1485933522 -3600 # Wed Feb 01 08:18:42 2017 +0100 # Node ID 32493f2373c18640e8233b2c2307e1843133a828 # Parent 3cbf5bd3db0f739d1029d6a0e8f82bc1280db785 postcommit_event instead of precommit_event precommit_event is too early to access in_state relation of workflowable entity diff --git a/hooks.py b/hooks.py --- a/hooks.py +++ b/hooks.py @@ -69,7 +69,7 @@ class IndexEsOperation(hook.DataOperationMixIn, hook.Operation): - def precommit_event(self): + def postcommit_event(self): indexer = self.cnx.vreg['es'].select('indexer', self.cnx) es = indexer.get_connection() if es is None or not self.cnx.vreg.config['index-name']: