From b2e39b970198e131972b0c7a0ffacec65004dcd0 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 17 Aug 2025 23:44:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=97=B6=E7=9A=84=E4=B8=80=E4=BA=9B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/db/migration/migra_3_to_4.py | 2 +- astrbot/core/persona_mgr.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/astrbot/core/db/migration/migra_3_to_4.py b/astrbot/core/db/migration/migra_3_to_4.py index e3eccd292..b8947cbd4 100644 --- a/astrbot/core/db/migration/migra_3_to_4.py +++ b/astrbot/core/db/migration/migra_3_to_4.py @@ -68,7 +68,7 @@ async def migration_conversation_table( platform_id = get_platform_id( platform_id_map, session.platform_name ) - session.platform_name = platform_id # 更新平台名称为新的 ID + session.platform_id = platform_id # 更新平台名称为新的 ID conv_v2 = ConversationV2( user_id=str(session), content=json.loads(conv.history) if conv.history else [], diff --git a/astrbot/core/persona_mgr.py b/astrbot/core/persona_mgr.py index a01106607..add3c74bc 100644 --- a/astrbot/core/persona_mgr.py +++ b/astrbot/core/persona_mgr.py @@ -52,7 +52,7 @@ class PersonaManager: return DEFAULT_PERSONALITY try: return next(p for p in self.personas_v3 if p["name"] == default_persona_id) - except ValueError: + except Exception: return DEFAULT_PERSONALITY async def delete_persona(self, persona_id: str):