From 3b54de0c90083aaf0857362e7c237fb85ba3976c Mon Sep 17 00:00:00 2001 From: jackfanwan <61672564+jackfanwan@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:08:28 +0800 Subject: [PATCH] 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 --- .../api/service/impl/TaskDefinitionServiceImpl.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java index e79507c6b5..ab71e9445c 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java @@ -820,9 +820,6 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe Map result = new HashMap<>(); TaskDefinitionLog taskDefinitionToUpdate = updateTask(loginUser, projectCode, taskCode, taskDefinitionJsonObj, result); - if (result.get(Constants.STATUS) != Status.SUCCESS && taskDefinitionToUpdate == null) { - return result; - } List upstreamTaskRelations = processTaskRelationMapper.queryUpstreamByCode(projectCode, taskCode); Set upstreamCodeSet = @@ -835,10 +832,6 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe if (CollectionUtils.isEqualCollection(upstreamCodeSet, upstreamTaskCodes) && taskDefinitionToUpdate == null) { putMsg(result, Status.SUCCESS); return result; - } else { - if (taskDefinitionToUpdate == null) { - taskDefinitionToUpdate = JSONUtils.parseObject(taskDefinitionJsonObj, TaskDefinitionLog.class); - } } Map queryUpStreamTaskCodeMap; if (CollectionUtils.isNotEmpty(upstreamTaskCodes)) {