diff --git a/core/elasticsearch/__init__.py b/core/elasticsearch/__init__.py index 3a6493ae..9ed5ff22 100644 --- a/core/elasticsearch/__init__.py +++ b/core/elasticsearch/__init__.py @@ -228,7 +228,7 @@ def process_query( resp_products = search_products.execute() results: dict[str, list[dict[str, Any]]] = {"products": [], "categories": [], "brands": [], "posts": []} - uuids_by_index: dict[str, list[dict[str, Any]]] = {"products": [], "categories": [], "brands": []} + uuids_by_index: dict[str, list[str]] = {"products": [], "categories": [], "brands": []} hit_cache: list[Any] = [] seen_keys: set[tuple[str, str]] = set() @@ -244,7 +244,7 @@ def process_query( hit_cache.append(hh) seen_keys.add(key) if getattr(hh, "uuid", None): - uuids_by_index.setdefault(hh.meta.index, []).append({"uuid": str(hh.uuid)}) + uuids_by_index.setdefault(hh.meta.index, []).append(str(hh.uuid)) exact_queries_by_index: dict[str, list[Any]] = { "categories": [ @@ -299,7 +299,7 @@ def process_query( hit_cache.append(h) seen_keys.add(k) if getattr(h, "uuid", None): - uuids_by_index.setdefault(h.meta.index, []).append({"uuid": str(h.uuid)}) + uuids_by_index.setdefault(h.meta.index, []).append(str(h.uuid)) products_by_uuid = {} brands_by_uuid = {}