Fix submission display if input/output not exist

This commit is contained in:
cuom1999 2021-05-29 21:43:16 -05:00
parent 13b63d7d84
commit ecfbd56d65

View file

@ -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