Skip to content

Commit

Permalink
Merge pull request #141 from LQDJudge/fix/test_formatter
Browse files Browse the repository at this point in the history
fix: Fallback to download whole file when can’t get preview
  • Loading branch information
hanzomaster authored Dec 9, 2024
2 parents de8eb4b + d2a8fd3 commit 3cecee4
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 3cecee4

Please sign in to comment.