diff --git a/entities.py b/entities.py
index 375fb06cb9b717f27bf77e23c66e8449f8a3ff40_ZW50aXRpZXMucHk=..7eebe9f503ee5c9e9f9bfbfab9882650ec6b0b89_ZW50aXRpZXMucHk= 100644
--- a/entities.py
+++ b/entities.py
@@ -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):