Skip to content
Snippets Groups Projects
Commit 7eebe9f503ee authored by Adrien Di Mascio's avatar Adrien Di Mascio
Browse files

safety belt, do not call create_index is no connection is available

parent 375fb06cb9b7
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,9 @@
settings = {}
deep_update(settings, self.settings)
deep_update(settings, custom_settings)
es.create_index(es.get_connection(self._cw.vreg.config), index_name, settings)
es_cnx = es.get_connection(self._cw.vreg.config)
if es_cnx is not None:
es.create_index(es_cnx, index_name, settings)
class IFullTextIndexSerializable(view.EntityAdapter):
......
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