Skip to content

Commit

Permalink
feat: create decorator?
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Mar 21, 2024
1 parent 03dcf09 commit 4a93b68
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions openedx/core/djangoapps/content/search/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down

0 comments on commit 4a93b68

Please sign in to comment.