diff --git a/judge/views/course.py b/judge/views/course.py index fb31aa7..8ab5c92 100644 --- a/judge/views/course.py +++ b/judge/views/course.py @@ -60,7 +60,7 @@ def calculate_lessons_progress(profile, lessons): res["total"] = { "achieved_points": total_achieved_points, "total_points": total_points, - "percentage": total_achieved_points / total_points * 100, + "percentage": total_achieved_points / total_points * 100 if total_points else 0, } return res