Fix contest submission bug when modifying from admin page

This commit is contained in:
cuom1999 2023-05-07 21:37:22 -05:00
parent 167fa1ad66
commit ad974530d5

View file

@ -206,6 +206,11 @@ class SubmissionAdmin(admin.ModelAdmin):
"problem__code", "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): def judge(self, request, queryset):
if not request.user.has_perm( if not request.user.has_perm(
"judge.rejudge_submission" "judge.rejudge_submission"