From 6d4b4c6ba7ed44b0ea6cc1c68633833dff272ab0 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 2 Nov 2023 11:06:37 +0800 Subject: [PATCH] fix bug --- app/core/plugin.py | 2 +- app/helper/module.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/plugin.py b/app/core/plugin.py index 904f0eb2..0c3dfcc9 100644 --- a/app/core/plugin.py +++ b/app/core/plugin.py @@ -216,7 +216,7 @@ class PluginManager(metaclass=Singleton): # ID conf.update({"id": pid}) # 安装状态 - if pid in installed_apps: + if pid in installed_apps and plugin_static: conf.update({"installed": True}) else: conf.update({"installed": False}) diff --git a/app/helper/module.py b/app/helper/module.py index dc6a8e0e..b1da6ab6 100644 --- a/app/helper/module.py +++ b/app/helper/module.py @@ -18,8 +18,8 @@ class ModuleHelper: """ submodules: list = [] + importlib.invalidate_caches() packages = importlib.import_module(package_path) - importlib.reload(packages) for importer, package_name, _ in pkgutil.iter_modules(packages.__path__): try: if package_name.startswith('_'):