fix:不认识的用户构建关系

This commit is contained in:
SengokuCola
2025-08-12 16:46:29 +08:00
parent 1efea7304e
commit 527f297397
2 changed files with 12 additions and 3 deletions

View File

@@ -144,7 +144,7 @@ class Person:
self.platform = platform
else:
logger.error("Person 初始化失败,缺少必要参数")
return
raise ValueError("Person 初始化失败,缺少必要参数")
if not is_person_known(person_id=self.person_id):
self.is_known = False
@@ -257,6 +257,8 @@ class Person:
def sync_to_database(self):
"""将所有属性同步回数据库"""
if not self.is_known:
return
try:
# 准备数据
data = {