Skip to content

Commit

Permalink
fixing HIT queries
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Apr 5, 2024
1 parent c5b3ec8 commit 8932386
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions beacon/db/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down

0 comments on commit 8932386

Please sign in to comment.