fix: 接口导入MS格式报空指针
This commit is contained in:
parent
1d4d99acf7
commit
b22b491109
|
@ -97,7 +97,7 @@ public class MsScenarioParser extends MsAbstractParser<ScenarioImport> {
|
|||
}
|
||||
}
|
||||
|
||||
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());
|
||||
|
|
|
@ -106,7 +106,7 @@ public class MsDefinitionParser extends MsAbstractParser<ApiDefinitionImport> {
|
|||
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());
|
||||
|
|
Loading…
Reference in New Issue