diff --git a/core/lib/opensearch.py b/core/lib/opensearch.py index 9a64feb..a7568de 100644 --- a/core/lib/opensearch.py +++ b/core/lib/opensearch.py @@ -363,9 +363,7 @@ def query_results( sources = [source] else: sources = settings.OPENSEARCH_MAIN_SOURCES - print("SOURCES", sources) if request.user.has_perm("core.restricted_sources"): - print("HAS PERM") for source_iter in settings.OPENSEARCH_SOURCES_RESTRICTED: sources.append(source_iter) diff --git a/core/templates/widgets/table_results.html b/core/templates/widgets/table_results.html index e7efc1e..fa5c52a 100644 --- a/core/templates/widgets/table_results.html +++ b/core/templates/widgets/table_results.html @@ -50,5 +50,5 @@ {% block custom_script %} - grid.removeWidget("drilldown-widget-results"); + grid.removeWidget("drilldown-widget-{{ unique }}"); {% endblock %} diff --git a/core/views/ui/drilldown.py b/core/views/ui/drilldown.py index feececb..af6f407 100644 --- a/core/views/ui/drilldown.py +++ b/core/views/ui/drilldown.py @@ -117,7 +117,7 @@ def drilldown_search(request, return_context=False, template=None): query_params = request.POST.dict() else: template_name = "ui/drilldown/drilldown.html" - context = {"sizes": sizes} + context = {"sizes": sizes, "unique": "results"} return render(request, template_name, context) tmp_post = request.POST.dict() @@ -166,6 +166,7 @@ def drilldown_search(request, return_context=False, template=None): extra_params["tags"] = tags context = query_results(request, query_params, **extra_params) + context["unique"] = "results" # Valid sizes context["sizes"] = sizes @@ -206,8 +207,6 @@ def drilldown_search(request, return_context=False, template=None): context["class"] = "warning" # unique = str(uuid.uuid4())[:8] - context["unique"] = "results" - context["widget_options"] = "" response = render(request, template_name, context) if request.GET: @@ -259,6 +258,7 @@ class DrilldownTableView(SingleTableView): if k not in context: context[k] = v context["show"] = show + if request.method == "GET": if not request.htmx: self.template_name = "ui/drilldown/drilldown.html"