fix: 修复查询接口依赖关系时报null

This commit is contained in:
CaptainB 2022-01-14 17:35:20 +08:00 committed by 刘瑞斌
parent 341bc4e182
commit 4780eb2f05
1 changed files with 3 additions and 0 deletions

View File

@ -1712,6 +1712,9 @@ public class ApiDefinitionService {
} else { } else {
apiDefinition = apiMap.get(relationshipEdge.getSourceId()); apiDefinition = apiMap.get(relationshipEdge.getSourceId());
} }
if (apiDefinition == null) {
continue;
}
relationshipEdgeDTO.setTargetName(apiDefinition.getName()); relationshipEdgeDTO.setTargetName(apiDefinition.getName());
relationshipEdgeDTO.setCreator(apiDefinition.getUserId()); relationshipEdgeDTO.setCreator(apiDefinition.getUserId());
relationshipEdgeDTO.setTargetNum(apiDefinition.getNum()); relationshipEdgeDTO.setTargetNum(apiDefinition.getNum());