From 03bb124b91d2d922facd5834f991714a89ba43ed Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 21 Jul 2021 17:38:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=85=A5MS?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=8A=A5=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/dto/automation/parse/MsScenarioParser.java | 2 +- .../api/dto/definition/parse/MsDefinitionParser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java b/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java index 3181656570..2f82272546 100644 --- a/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java +++ b/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java @@ -97,7 +97,7 @@ public class MsScenarioParser extends MsAbstractParser { } } - if (finalNodeMap != null) { + if (finalNodeMap != null && finalNodeMap.get(item.getApiScenarioModuleId()) != null) { NodeTree node = finalNodeMap.get(item.getApiScenarioModuleId()); item.setApiScenarioModuleId(node.getNewId()); item.setModulePath(node.getPath()); diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java index 5ca3aa2568..d27bf76a8a 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java @@ -106,7 +106,7 @@ public class MsDefinitionParser extends MsAbstractParser { String originId = apiDefinition.getId(); String id = UUID.randomUUID().toString(); - if (nodeMap != null) { + if (nodeMap != null && nodeMap.get(apiDefinition.getModuleId()) != null) { NodeTree nodeTree = nodeMap.get(apiDefinition.getModuleId()); apiDefinition.setModuleId(nodeTree.getNewId()); apiDefinition.setModulePath(nodeTree.getPath());