mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 00:22:03 +00:00
修复 ACM 类型题目导入后,无法显示测试用例信息的问题
This commit is contained in:
parent
efddadb898
commit
2dc1d0cbce
@ -154,8 +154,9 @@ class ExportProblemSerializer(serializers.ModelSerializer):
|
||||
return self._html_format_value(obj.hint)
|
||||
|
||||
def get_test_case_score(self, obj):
|
||||
return [{"score": item["score"], "input_name": item["input_name"], "output_name": item["output_name"]}
|
||||
for item in obj.test_case_score] if obj.rule_type == ProblemRuleType.OI else None
|
||||
return [{"score": item["score"] if obj.rule_type == ProblemRuleType.OI else 100,
|
||||
"input_name": item["input_name"], "output_name": item["output_name"]}
|
||||
for item in obj.test_case_score]
|
||||
|
||||
def get_spj(self, obj):
|
||||
return {"code": obj.spj_code,
|
||||
|
Loading…
Reference in New Issue
Block a user