fix(statistics): run recalculate independently

This commit is contained in:
MingxuanGame
2025-08-19 13:45:12 +00:00
parent 65bd7ca7d0
commit ce756c354b
3 changed files with 16 additions and 6 deletions

View File

@@ -537,7 +537,9 @@ def calculate_playtime(score: Score, beatmap_length: int) -> tuple[int, bool]:
+ (score.nsmall_tick_hit or 0)
)
total_obj = 0
for statistics, count in score.maximum_statistics.items():
for statistics, count in (
score.maximum_statistics.items() if score.maximum_statistics else {}
):
if not isinstance(statistics, HitResult):
statistics = HitResult(statistics)
if statistics.is_scorable():