|
|
@@ -50,7 +50,7 @@ public class CourseService {
|
|
|
Integer evalId;
|
|
|
|
|
|
// 创建Coder课程
|
|
|
- if (courseVO.getCoderId().equals(-1)) {
|
|
|
+ if (courseVO.getCoderId() != null) {
|
|
|
JSONObject coderRes = coderService.createService(courseVO);
|
|
|
if (!coderRes.containsKey("res")) {
|
|
|
throw new CustomErrorException("Coder: " + coderRes.get("msg"));
|
|
|
@@ -61,7 +61,7 @@ public class CourseService {
|
|
|
}
|
|
|
}
|
|
|
// 创建Eval课程
|
|
|
- if (courseVO.getEvalId().equals(-1)) {
|
|
|
+ if (courseVO.getEvalId() != null) {
|
|
|
JSONObject evalRes = evalService.createService(courseVO);
|
|
|
if (evalRes.containsKey("error")) {
|
|
|
throw new CustomErrorException("Eval: " + evalRes.get("error"));
|