From 7d0ebf87bdb31d5548cbdf6b131e752b386dd7e3 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Fri, 10 Feb 2023 07:20:22 +0000 Subject: [PATCH] Fix source parsing and set default to all --- app/local_settings.example.py | 2 +- core/db/elastic.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/local_settings.example.py b/app/local_settings.example.py index 32abd29..ab02dd5 100644 --- a/app/local_settings.example.py +++ b/app/local_settings.example.py @@ -29,7 +29,7 @@ DRILLDOWN_DEFAULT_PARAMS = { "size": "15", "index": "main", "sorting": "desc", - "source": "4ch", + "source": "all", } diff --git a/core/db/elastic.py b/core/db/elastic.py index e63c3a2..19b9674 100644 --- a/core/db/elastic.py +++ b/core/db/elastic.py @@ -548,7 +548,7 @@ class ElasticsearchBackend(StorageBackend): add_top_tmp["bool"]["should"].append( {"match_phrase": {"src": source_iter}} ) - if rule_object is not None and query_params["source"] != "all": + if query_params["source"] != "all": add_top.append(add_top_tmp) # R - Ranges