Added 'catalog' parameter to all '*index_object' functions
authorThierry Florac <thierry.florac@onf.fr>
Mon, 11 Sep 2017 14:36:15 +0200
changeset 27 47291be5bb8f
parent 26 4f3937b02ba5
child 28 d8405a4d7d45
Added 'catalog' parameter to all '*index_object' functions
src/pyams_catalog/utils.py
--- a/src/pyams_catalog/utils.py	Mon Sep 11 14:34:38 2017 +0200
+++ b/src/pyams_catalog/utils.py	Mon Sep 11 14:36:15 2017 +0200
@@ -34,7 +34,7 @@
     return str(frozenset(obj))
 
 
-def index_object(obj, catalog, ignore_notyet=False):
+def index_object(obj, catalog='', ignore_notyet=False):
     """Index given object into catalog"""
     logger.debug("Indexing object {0!r}".format(obj))
     intids = query_utility(IIntIds)
@@ -51,7 +51,7 @@
                 catalog.index_doc(object_id, obj)
 
 
-def reindex_object(obj, catalog):
+def reindex_object(obj, catalog=''):
     """Reindex given object into catalog"""
     logger.debug("Re-indexing object {0!r}".format(obj))
     intids = query_utility(IIntIds)
@@ -64,7 +64,7 @@
                 catalog.reindex_doc(object_id, obj)
 
 
-def unindex_object(obj, catalog):
+def unindex_object(obj, catalog=''):
     """Unindex given object from catalog"""
     logger.debug("Un-indexing object {0!r}".format(obj))
     intids = query_utility(IIntIds)