From ad974530d5d88682c9e89c587cdbdefacf451e6d Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Sun, 7 May 2023 21:37:22 -0500 Subject: [PATCH] Fix contest submission bug when modifying from admin page --- judge/admin/submission.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/judge/admin/submission.py b/judge/admin/submission.py index f621783..2a6067a 100644 --- a/judge/admin/submission.py +++ b/judge/admin/submission.py @@ -206,6 +206,11 @@ class SubmissionAdmin(admin.ModelAdmin): "problem__code", ) + def save_model(self, request, obj, form, change): + super().save_model(request, obj, form, change) + if "case_points" in form.changed_data or "case_total" in form.changed_data: + obj.update_contest() + def judge(self, request, queryset): if not request.user.has_perm( "judge.rejudge_submission"