Skip to content
Snippets Groups Projects
Commit 418cc00ec3e8 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[hooks] if index-name is not configured, skip hook

parent d91a368a788c
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@
def precommit_event(self):
indexer = self.cnx.vreg['es'].select('indexer', self.cnx)
es = indexer.get_connection()
if es is None:
if es is None or not self.cnx.vreg.config['index-name']:
log.info('no connection to ES (not configured) skip ES indexing')
return
for entity in self.get_data():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment