From 0401468ff36a7307bb6adc27cb387a8dde36d859 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sun, 22 Sep 2019 15:05:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=AF=94=E8=B5=9B=E9=A2=98?= =?UTF-8?q?=E7=9B=AE=E6=9A=82=E6=97=B6=E4=B8=8D=E5=88=A0=E9=99=A4=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problem/views/admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/problem/views/admin.py b/problem/views/admin.py index 874a7f79..ee04dc13 100644 --- a/problem/views/admin.py +++ b/problem/views/admin.py @@ -430,9 +430,9 @@ class ContestProblemAPI(ProblemBase): ensure_created_by(problem.contest, request.user) if Submission.objects.filter(problem=problem).exists(): return self.error("Can't delete the problem as it has submissions") - d = os.path.join(settings.TEST_CASE_DIR, problem.test_case_id) - if os.path.isdir(d): - shutil.rmtree(d, ignore_errors=True) + # d = os.path.join(settings.TEST_CASE_DIR, problem.test_case_id) + # if os.path.isdir(d): + # shutil.rmtree(d, ignore_errors=True) problem.delete() return self.success()