fix error path in download submissions

This commit is contained in:
zema1 2018-09-26 17:48:46 +08:00
parent 5ba93be021
commit 7aeec10391

View File

@ -203,7 +203,7 @@ class DownloadContestSubmissions(APIView):
submissions = Submission.objects.filter(contest=contest, result=JudgeStatus.ACCEPTED).order_by("-create_time")
user_ids = submissions.values_list("user_id", flat=True)
users = User.objects.filter(id__in=user_ids)
path = f"./{rand_str()}.zip"
path = f"/tmp/{rand_str()}.zip"
with zipfile.ZipFile(path, "w") as zip_file:
for user in users:
if user.is_admin_role() and exclude_admin: