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):