From 7fc6d0e012e95ef87231fb8a48accb752dd9707f Mon Sep 17 00:00:00 2001 From: langxm Date: Tue, 13 Oct 2026 18:23:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20progress.on=5Fac=20None=20=E5=AE=89?= =?UTF-8?q?=E5=85=A8=EF=BC=88day=5Fdone/streak=5Fdays=20NULL=20=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/progress_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/services/progress_service.py b/backend/app/services/progress_service.py index e31bdb3..5521954 100644 --- a/backend/app/services/progress_service.py +++ b/backend/app/services/progress_service.py @@ -33,9 +33,9 @@ class ProgressService: self.session.add(row) today = date.today() if row.last_ac_date != today: - row.day_done += 1 + row.day_done = (row.day_done or 0) + 1 if row.last_ac_date and (today - row.last_ac_date).days == 1: - row.streak_days += 1 + row.streak_days = (row.streak_days or 0) + 1 elif row.last_ac_date != today: row.streak_days = 1 row.last_ac_date = today