From fabfbd9f7f651c39f39b56a8d59ce4dcfba6ddbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=95=E8=B0=B7=E9=85=B1?= <74496778+GooGuJiang@users.noreply.github.com> Date: Fri, 22 Aug 2025 03:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BB=B6=E8=BF=9F=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/router/v2/score.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/router/v2/score.py b/app/router/v2/score.py index 755608a..8ec01d8 100644 --- a/app/router/v2/score.py +++ b/app/router/v2/score.py @@ -199,7 +199,8 @@ async def submit_score( await db.commit() # 成绩提交后刷新用户缓存 - 移至后台任务避免阻塞主流程 - # 预先获取游戏模式,避免在后台任务中触发延迟加载 + # 确保score对象已刷新,避免在后台任务中触发延迟加载 + await db.refresh(score) score_gamemode = score.gamemode if user_id is not None: