From fe82508142f095eda4684b54b25afe550c78b330 Mon Sep 17 00:00:00 2001 From: Lekuru Date: Sat, 14 Oct 2023 23:55:00 +0200 Subject: [PATCH] Fix `fail_time` in `stats.restore()` --- database/repositories/stats.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/database/repositories/stats.py b/database/repositories/stats.py index 20d1421..1aee630 100644 --- a/database/repositories/stats.py +++ b/database/repositories/stats.py @@ -83,6 +83,9 @@ def restore(user_id: int) -> None: .filter(DBScore.status == 1) \ .scalar() + if not fail_times: + fail_times = 0 + map_times = session.query( DBScore, func.sum(DBBeatmap.total_length)