diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py
index 3a6107ded0aa66ce64b20cbf592a5bd73c933179..7519426b8ae49de7e1ebd95f19d0990b66d1305d 100644
--- a/ckanext/odsh/plugin.py
+++ b/ckanext/odsh/plugin.py
@@ -335,8 +335,8 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm
     def before_index(self, dict_pkg):
         debug = config.get('ckanext.odsh.debug',False)
         slave = config.get('ckanext.odsh.slave',False)
-        if debug and slave:
-            raise 'indexing on slave not allowed'
+        assert not (debug and slave)
+
         # make special date fields solr conform
         fields = ["issued", "temporal_start", "temporal_end"]
         for field in fields: