diff --git a/hooks.py b/hooks.py
index a0fa54761a3da383a86b4f6c26853a04c668f1af_aG9va3MucHk=..a26b16bb6ec53907175b1c3b49d62ba250d6fe7b_aG9va3MucHk= 100644
--- a/hooks.py
+++ b/hooks.py
@@ -72,7 +72,7 @@
     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']:
+        if es is None or not indexer.index_name:
             log.error('no connection to ES (not configured) skip ES indexing')
             return
         for entity in self.get_data():