diff --git a/openedx/core/djangoapps/content/search/api.py b/openedx/core/djangoapps/content/search/api.py index 46eb96a2399a..13bec3e88a41 100644 --- a/openedx/core/djangoapps/content/search/api.py +++ b/openedx/core/djangoapps/content/search/api.py @@ -218,6 +218,18 @@ def _recurse_children(block, fn, status_cb: Callable[[str], None] | None = None) else: fn(child) +# ToDo: create a decorator?? +# def if_search_enabled(f): +# """ +# Only call `f` if meilisearch is enabled +# """ +# @wraps(f) +# def wrapper(*args, **kwargs): +# """Wraps the decorated function.""" +# if is_meilisearch_enabled(): +# return f(*args, **kwargs) +# return wrapper + def is_meilisearch_enabled() -> bool: """