diff --git a/judge/views/submission.py b/judge/views/submission.py index d130062..faa4d60 100644 --- a/judge/views/submission.py +++ b/judge/views/submission.py @@ -156,8 +156,10 @@ def get_cases_data(submission): for case in testcases: if case.type != 'C': continue count += 1 - problem_data[count] = {'input': case_data[case.input_file], - 'answer': case_data[case.output_file]} + problem_data[count] = { + 'input': case_data[case.input_file] if case.input_file else '', + 'answer': case_data[case.output_file] if case.output_file else '', + } return problem_data