Don't add sources to query if we are allowed to see them all
This commit is contained in:
parent
667e4c475f
commit
02e1b4698d
|
@ -162,8 +162,12 @@ def query_results(
|
||||||
sources.append(source_iter)
|
sources.append(source_iter)
|
||||||
|
|
||||||
add_top_tmp = {"bool": {"should": []}}
|
add_top_tmp = {"bool": {"should": []}}
|
||||||
|
total_count = 0
|
||||||
for source_iter in sources:
|
for source_iter in sources:
|
||||||
add_top_tmp["bool"]["should"].append({"equals": {"src": source_iter}})
|
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)
|
add_top.append(add_top_tmp)
|
||||||
|
|
||||||
# Date/time range
|
# Date/time range
|
||||||
|
|
Loading…
Reference in New Issue