Don't add sources to query if we are allowed to see them all

master
Mark Veidemanis 2 years ago
parent 667e4c475f
commit 02e1b4698d
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -162,8 +162,12 @@ def query_results(
sources.append(source_iter)
add_top_tmp = {"bool": {"should": []}}
total_count = 0
for source_iter in sources:
add_top_tmp["bool"]["should"].append({"equals": {"src": source_iter}})
total_count += 1
total_sources = len(settings.MANTICORE_MAIN_SOURCES) + len(settings.MANTICORE_SOURCES_RESTRICTED)
if not total_count == total_sources:
add_top.append(add_top_tmp)
# Date/time range

Loading…
Cancel
Save