From 5a8380525dd94c68c1f966ee419eea846a1c1daa Mon Sep 17 00:00:00 2001 From: jxxghp Date: Fri, 4 Sep 2026 10:53:08 +0800 Subject: [PATCH] fix(api): keep plugin endpoint within complexity budget --- app/api/endpoints/plugin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/api/endpoints/plugin.py b/app/api/endpoints/plugin.py index 029478c91..a266090c5 100644 --- a/app/api/endpoints/plugin.py +++ b/app/api/endpoints/plugin.py @@ -197,9 +197,7 @@ async def all_plugins( page, count = resolve_compatible_pagination(page, count) assert page is not None and count is not None return plugins[(page - 1) * count : page * count] - if max_results is None: - return plugins - return plugins[:max_results] + return plugins if max_results is None else plugins[:max_results] @router.get("/installed", summary="已安装插件", response_model=List[str])