From: root Date: Wed, 2 Sep 2026 23:25:21 +0000 (+0800) Subject: V1: 修复学习进度回写 study_logs 缺失 new_group_id,使 split 可自动同步进度 X-Git-Url: http://acesimba.cloud/gitweb/?a=commitdiff_plain;h=fbd8ea6404aba8a8687d53209b3f8ad8d2b126fa;p=words.git V1: 修复学习进度回写 study_logs 缺失 new_group_id,使 split 可自动同步进度 --- diff --git a/backend/main.py b/backend/main.py index fd91b1f..ba6d61e 100644 --- a/backend/main.py +++ b/backend/main.py @@ -441,8 +441,8 @@ async def update_progress(data: ProgressUpdate): conn.close() return {"status": "skipped", "date": now, "reason": "duplicate same-day record"} cursor.execute( - "INSERT INTO study_logs (group_id, op_type, status, created_at, log_date, duration_sec) VALUES (?, ?, ?, ?, ?, ?)", - (data.group_id, data.op_type, 'completed', now, today_prefix, data.duration_sec or 0) + "INSERT INTO study_logs (group_id, new_group_id, op_type, status, created_at, log_date, duration_sec) VALUES (?, ?, ?, ?, ?, ?, ?)", + (data.group_id, str(data.group_id), data.op_type, 'completed', now, today_prefix, data.duration_sec or 0) ) conn.commit() conn.close()