From 89323863359bf30047e47390274b42d07966981e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20L=C3=B3pez-Doriga?= Date: Fri, 5 Apr 2024 13:49:17 +0200 Subject: [PATCH] fixing HIT queries --- beacon/db/utils.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/beacon/db/utils.py b/beacon/db/utils.py index 0f44d99d..50f2b405 100644 --- a/beacon/db/utils.py +++ b/beacon/db/utils.py @@ -188,12 +188,9 @@ def get_docs_by_response_type(include: str, query: dict, datasets_dict: dict, da ) elif include == 'HIT': count=0 - LOG.debug(query) - #LOG.debug(count) - query_count={} + query_count=query i=1 query_count["$or"]=[] - LOG.debug(query) for k, v in datasets_dict.items(): if k == dataset: for id in v: @@ -208,10 +205,8 @@ def get_docs_by_response_type(include: str, query: dict, datasets_dict: dict, da query_count["$or"].append(queryid) i=1 if query_count["$or"]!=[]: - #LOG.debug(query_count) - dataset_count = get_count(mongo_collection, query) + dataset_count = get_count(mongo_collection, query_count) #LOG.debug(dataset_count) - #LOG.debug(limit) docs = get_documents( mongo_collection, query_count,