Skip to content

Commit

Permalink
fix: Fallback to download whole file when can’t get preview
Browse files Browse the repository at this point in the history
This is a temporary fix. The content of the file still missing after the convert function
  • Loading branch information
hanzomaster committed Dec 9, 2024
1 parent de8eb4b commit d2a8fd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/views/test_formatter/test_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get(self, request):
for i in range(len(preview_file)):
response = response + (f"<p>{preview_file[i]}</p>\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,
Expand Down

0 comments on commit d2a8fd3

Please sign in to comment.