From 084c2f69ed475537a903cbbf562ef5be4c386b5b Mon Sep 17 00:00:00 2001 From: Daniel Valenzuela Date: Thu, 28 Nov 2024 09:37:59 -0300 Subject: [PATCH] fix: settings name overshadow --- openedx/core/djangoapps/content/search/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/content/search/api.py b/openedx/core/djangoapps/content/search/api.py index 297505a21b26..688223ece13b 100644 --- a/openedx/core/djangoapps/content/search/api.py +++ b/openedx/core/djangoapps/content/search/api.py @@ -397,7 +397,7 @@ def _is_index_configured(index_name: str) -> bool: """ client = _get_meilisearch_client() index = client.get_index(index_name) - settings = index.get_settings() + index_settings = index.get_settings() for k, v in ( ("distinctAttribute", INDEX_DISTINCT_ATTRIBUTE), ("filterableAttributes", INDEX_FILTRABLE_ATTRIBUTES), @@ -405,7 +405,7 @@ def _is_index_configured(index_name: str) -> bool: ("sortableAttributes", INDEX_SORTABLE_ATTRIBUTES), ("rankingRules", INDEX_RANKING_RULES), ): - setting = settings.get(k, []) + setting = index_settings.get(k, []) if isinstance(v, list): v = set(v) setting = set(setting)