Browse Source

fix when the task details are not modified, the predecessor node cannot be modified (#13422)

* fix when the task details are not modified, the predecessor node cannot be modified

* deleted useless code

Co-authored-by: fanwanlong <fanwanlong@kezaihui.com>
3.1.5-release
jackfanwan 2 years ago committed by zhuangchong
parent
commit
96601fef4c
  1. 7
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java

7
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java

@ -573,9 +573,6 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
TaskDefinitionLog taskDefinitionToUpdate = TaskDefinitionLog taskDefinitionToUpdate =
updateTask(loginUser, projectCode, taskCode, taskDefinitionJsonObj, result); updateTask(loginUser, projectCode, taskCode, taskDefinitionJsonObj, result);
if (result.get(Constants.STATUS) != Status.SUCCESS && taskDefinitionToUpdate == null) {
return result;
}
List<ProcessTaskRelation> upstreamTaskRelations = List<ProcessTaskRelation> upstreamTaskRelations =
processTaskRelationMapper.queryUpstreamByCode(projectCode, taskCode); processTaskRelationMapper.queryUpstreamByCode(projectCode, taskCode);
Set<Long> upstreamCodeSet = Set<Long> upstreamCodeSet =
@ -588,10 +585,6 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe
if (CollectionUtils.isEqualCollection(upstreamCodeSet, upstreamTaskCodes) && taskDefinitionToUpdate == null) { if (CollectionUtils.isEqualCollection(upstreamCodeSet, upstreamTaskCodes) && taskDefinitionToUpdate == null) {
putMsg(result, Status.SUCCESS); putMsg(result, Status.SUCCESS);
return result; return result;
} else {
if (taskDefinitionToUpdate == null) {
taskDefinitionToUpdate = JSONUtils.parseObject(taskDefinitionJsonObj, TaskDefinitionLog.class);
}
} }
Map<Long, TaskDefinition> queryUpStreamTaskCodeMap; Map<Long, TaskDefinition> queryUpStreamTaskCodeMap;
if (CollectionUtils.isNotEmpty(upstreamTaskCodes)) { if (CollectionUtils.isNotEmpty(upstreamTaskCodes)) {

Loading…
Cancel
Save