fix(接口测试): 兼容导入数据模块匹配不到问题

--bug=1016486 --user=赵勇 [接口测试]  github#17577接口运行环境使用模块,调试接口,未取到域名ip信息 https://www.tapd.cn/55049933/s/1236411
This commit is contained in:
fit2-zhao 2022-08-31 11:29:00 +08:00 committed by fit2-zhao
parent d52084793a
commit 189489a7e4
1 changed files with 4 additions and 0 deletions

View File

@ -137,6 +137,10 @@ public class ParameterConfig extends MsParameter {
} }
} else { } else {
apiDefinition = apiDefinitionService.get(samplerProxy.getId()); apiDefinition = apiDefinitionService.get(samplerProxy.getId());
// 兼容导入数据
if(apiDefinition == null ){
apiDefinition = apiDefinitionService.get(samplerProxy.getName());
}
ApiTestCaseWithBLOBs apiTestCaseWithBLOBs = apiTestCaseService.get(samplerProxy.getId()); ApiTestCaseWithBLOBs apiTestCaseWithBLOBs = apiTestCaseService.get(samplerProxy.getId());
if (apiTestCaseWithBLOBs == null) { if (apiTestCaseWithBLOBs == null) {
apiTestCaseWithBLOBs = apiTestCaseService.get(samplerProxy.getName()); apiTestCaseWithBLOBs = apiTestCaseService.get(samplerProxy.getName());