From 999e0dcb15b4cba9bef33013c27001d40cb6df12 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Tue, 9 Jan 2024 13:13:08 -0600 Subject: [PATCH] Fix manage problem & update impersonate --- dmoj/settings.py | 7 +++++-- judge/views/problem_manage.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dmoj/settings.py b/dmoj/settings.py index 16d77b8..43c7527 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -278,8 +278,11 @@ LANGUAGE_COOKIE_AGE = 8640000 FORM_RENDERER = "django.forms.renderers.TemplatesSetting" -IMPERSONATE_REQUIRE_SUPERUSER = True -IMPERSONATE_DISABLE_LOGGING = True +IMPERSONATE = { + "REQUIRE_SUPERUSER": True, + "DISABLE_LOGGING": True, + "ADMIN_DELETE_PERMISSION": True, +} ACCOUNT_ACTIVATION_DAYS = 7 diff --git a/judge/views/problem_manage.py b/judge/views/problem_manage.py index e060cde..dfce739 100644 --- a/judge/views/problem_manage.py +++ b/judge/views/problem_manage.py @@ -106,7 +106,7 @@ class BaseActionSubmissionsView( try: languages = list(map(int, self.request.POST.getlist("language"))) - results = list(map(int, self.request.POST.getlist("result"))) + results = list(map(str, self.request.POST.getlist("result"))) contests = list(map(int, self.request.POST.getlist("contest"))) except ValueError: return HttpResponseBadRequest()