Browse Source

Merge pull request #115 from samz406/master

更新项目名时没有做名称唯一性校验
pull/2/head
easyscheduler 6 years ago committed by GitHub
parent
commit
9247e977e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      escheduler-api/src/main/java/cn/escheduler/api/service/ProjectService.java

6
escheduler-api/src/main/java/cn/escheduler/api/service/ProjectService.java

@ -242,7 +242,11 @@ public class ProjectService extends BaseService{
if (checkResult != null) {
return checkResult;
}
Project tempProject = projectMapper.queryByName(projectName);
if (tempProject != null && tempProject.getId() != projectId) {
putMsg(result, Status.PROJECT_ALREADY_EXISTS, projectName);
return result;
}
project.setName(projectName);
project.setDesc(desc);
project.setUpdateTime(new Date());

Loading…
Cancel
Save