From 4b99d7272c59a2a4d5bebaab0982b6deda407a32 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 12 Sep 2022 08:23:03 +0100 Subject: [PATCH] Adjust context size and pass it directly --- core/views/ui/drilldown.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/views/ui/drilldown.py b/core/views/ui/drilldown.py index 8051c04..cb10566 100644 --- a/core/views/ui/drilldown.py +++ b/core/views/ui/drilldown.py @@ -289,7 +289,7 @@ class DrilldownContextModal(APIView): if request.resolver_match.url_name == "modal_context_table": self.template_name = "partials/context_table.html" - size = 20 + size = 15 nicks_sensitive = None query = False # Create the query params from the POST arguments @@ -356,6 +356,7 @@ class DrilldownContextModal(APIView): query_params["sorting"] = "desc" # SAFE_PARAMS["sorting"] = "desc" + query_params["size"] = size annotate = False if query_params["source"] == "irc": @@ -374,10 +375,10 @@ class DrilldownContextModal(APIView): type=type, nicks=nicks_sensitive, ) - results = query_results( request, query_params, + size=size, annotate=annotate, custom_query=search_query, reverse=True,