Fix submission display if input/output not exist
This commit is contained in:
parent
13b63d7d84
commit
ecfbd56d65
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue