From 86caee74c5433ba918c6ee19398b58ad4c9bb014 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Thu, 10 Feb 2022 00:32:35 -0800 Subject: [PATCH] fix(rpc): use max_rpc_results for type=multiinfo result limit Signed-off-by: Kevin Morris --- aurweb/rpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aurweb/rpc.py b/aurweb/rpc.py index 90e03a41..bfa96f59 100644 --- a/aurweb/rpc.py +++ b/aurweb/rpc.py @@ -274,7 +274,8 @@ class RPC: ] # Union all subqueries together. - query = subqueries[0].union_all(*subqueries[1:]) + max_results = config.getint("options", "max_rpc_results") + query = subqueries[0].union_all(*subqueries[1:]).limit(max_results) # Store our extra information in a class-wise dictionary, # which contains package id -> extra info dict mappings.