Skip to content

Commit

Permalink
fix: 接口导入MS格式报空指针
Browse files Browse the repository at this point in the history
  • Loading branch information
AgAngle committed Jul 21, 2021
1 parent 1d4d99a commit b22b491
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private ScenarioImport parseMsFormat(String testStr, ApiTestImportRequest import
}
}

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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void parseApiDefinition(ApiDefinitionWithBLOBs apiDefinition, ApiTestImp
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());
Expand Down

0 comments on commit b22b491

Please sign in to comment.