From d2a8fd385f33a845e97baf88df9736196cc4b1c7 Mon Sep 17 00:00:00 2001 From: Thinh Tran Date: Mon, 9 Dec 2024 18:48:59 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20Fallback=20to=20download=20whole=20file?= =?UTF-8?q?=20when=20can=E2=80=99t=20get=20preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a temporary fix. The content of the file still missing after the convert function --- judge/views/test_formatter/test_formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/views/test_formatter/test_formatter.py b/judge/views/test_formatter/test_formatter.py index 6eb5cb62..44314367 100644 --- a/judge/views/test_formatter/test_formatter.py +++ b/judge/views/test_formatter/test_formatter.py @@ -178,7 +178,7 @@ def get(self, request): for i in range(len(preview_file)): response = response + (f"

{preview_file[i]}

\n") - files_list = [preview_file[0], preview_file[1]] + files_list = preview_file[:2] if len(preview_file) > 2 else preview_file return render( request,