Browse Source

modify saveWorkerGroup may NPE (#1629)

* User update  not check params

* user phone update when noteEmpty

* modify saveWorkerGroup may NPE
pull/2/head
samz406 5 years ago committed by qiaozhanwei
parent
commit
6d4a3410c8
  1. 5
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/WorkerGroupService.java

5
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/WorkerGroupService.java

@ -76,6 +76,11 @@ public class WorkerGroupService extends BaseService {
WorkerGroup workerGroup = null;
if(id != 0){
workerGroup = workerGroupMapper.selectById(id);
//check exist
if (workerGroup == null){
workerGroup = new WorkerGroup();
workerGroup.setCreateTime(now);
}
}else{
workerGroup = new WorkerGroup();
workerGroup.setCreateTime(now);

Loading…
Cancel
Save