From 9f8fe1006d8ce7ac463067ef4c79b00bcca4afff Mon Sep 17 00:00:00 2001 From: Le Bao Hiep Date: Fri, 1 Dec 2023 00:09:55 +0700 Subject: [PATCH] Fix --- judge/utils/problem_data.py | 5 ++--- locale/en/LC_MESSAGES/django.po | 7 +------ locale/vi/LC_MESSAGES/django.po | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/judge/utils/problem_data.py b/judge/utils/problem_data.py index 7d57b0a55..43dcf65d8 100644 --- a/judge/utils/problem_data.py +++ b/judge/utils/problem_data.py @@ -262,8 +262,7 @@ def make_grader(init, case): end_batch() if case.points is None: raise ProblemDataError(_('Batch start case #%d requires points.') % i) - if case.points is not None: - total_point += case.points + total_point += case.points batch = { 'points': case.points, 'batched': [], @@ -295,7 +294,7 @@ def make_grader(init, case): end_batch() batch = None if total_point <= 0: - raise ProblemDataError(_('Total Points must be greater than 0')) + raise ProblemDataError(_('Total points must be greater than 0.')) if batch: end_batch() diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 95f2707df..c5a5426b3 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -3269,14 +3269,9 @@ msgstr "" msgid "Batch start case #%d requires points." msgstr "" -#: judge/utils/problem_data.py:287 -#, python-format -msgid "Attempt to end batch outside of one in case #%d" -msgstr "" - #: judge/utils/problem_data.py:297 #, python-format -msgid "Total Points must be greater than 0" +msgid "Attempt to end batch outside of one in case #%d" msgstr "" #: judge/utils/problem_data.py:315 diff --git a/locale/vi/LC_MESSAGES/django.po b/locale/vi/LC_MESSAGES/django.po index c22b9289e..36980a3aa 100644 --- a/locale/vi/LC_MESSAGES/django.po +++ b/locale/vi/LC_MESSAGES/django.po @@ -3398,8 +3398,8 @@ msgstr "Kết thúc nhóm nhưng không có bắt đầu ở case #%d" #: judge/utils/problem_data.py:297 #, python-format -msgid "Total Points must be greater than 0" -msgstr "Tổng điểm của các test phải lớn hơn 0" +msgid "Total points must be greater than 0." +msgstr "Tổng điểm của các test phải lớn hơn 0." #: judge/utils/problem_data.py:301 msgid "How did you corrupt the zip path?"