From 573ef39fd690bb642273804bd39baffa99143910 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Fri, 12 Sep 2025 17:31:49 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20plugin=5Finfo.get=5Fplugin?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=8C=85=E5=90=ABplugin=5Ftype=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=95=88=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhenxun/models/plugin_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zhenxun/models/plugin_info.py b/zhenxun/models/plugin_info.py index 177ab70e..533fe0e8 100644 --- a/zhenxun/models/plugin_info.py +++ b/zhenxun/models/plugin_info.py @@ -77,7 +77,7 @@ class PluginInfo(Model): 返回: Self | None: 插件 """ - if filter_parent: + if not kwargs.get("plugin_type") and filter_parent: return await cls.get_or_none( load_status=load_status, plugin_type__not=PluginType.PARENT, **kwargs ) @@ -96,7 +96,7 @@ class PluginInfo(Model): 返回: list[Self]: 插件列表 """ - if filter_parent: + if not kwargs.get("plugin_type") and filter_parent: return await cls.filter( load_status=load_status, plugin_type__not=PluginType.PARENT, **kwargs ).all()