From b1319a9f1ee0c75572bada25ca70065282ba37b2 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 16 Jun 2026 14:36:08 +0800 Subject: [PATCH] fix: add get_module_dbname to plugin for portal unified DB --- plugins/cms_functions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/cms_functions.py b/plugins/cms_functions.py index 2ef87f6..7674bd0 100644 --- a/plugins/cms_functions.py +++ b/plugins/cms_functions.py @@ -81,11 +81,17 @@ async def get_latest_news(limit=3): return [] +def get_module_dbname(module_name): + """Portal 所有模块共用 ocai_cms 数据库""" + return 'ocai_cms' + + def load_cms(): g = ServerEnv() g.get_site_config = get_site_config g.get_published_content = get_published_content g.get_latest_news = get_latest_news + g.get_module_dbname = get_module_dbname load_cms()