From 1af44ac9fa8a05f36c695c4dc52c9950a3baba75 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Fri, 17 Mar 2023 11:53:19 -0500 Subject: [PATCH] Fix resolver when there's no subtask --- judge/views/resolver.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/judge/views/resolver.py b/judge/views/resolver.py index 2085194..eade951 100644 --- a/judge/views/resolver.py +++ b/judge/views/resolver.py @@ -47,6 +47,7 @@ class Resolver(TemplateView): subtask, sub_id, ) in self.contest.format.get_results_by_subtask(participation, True): + subtask = subtask or 1 problem_id = str(problem_id) order = id_to_order[problem_id] problem_sub[order - 1] = max(problem_sub[order - 1], subtask) @@ -69,6 +70,7 @@ class Resolver(TemplateView): subtask, sub_id, ) in self.contest.format.get_results_by_subtask(participation, True): + subtask = subtask or 1 problem_id = str(problem_id) order = id_to_order[problem_id] points_map[(order, subtask)] = subtask_points @@ -86,6 +88,7 @@ class Resolver(TemplateView): subtask, sub_id, ) in self.contest.format.get_results_by_subtask(participation, False): + subtask = subtask or 1 problem_id = str(problem_id) order = id_to_order[problem_id] frozen_points_map[(order, subtask)] = subtask_points