fix(环境管理): 修复创建环境未选择项目报错问题 #1005210
--bug=1005210 --user=赵勇 【系统设置-项目-环境... https://www.tapd.cn/55049933/s/1025828
This commit is contained in:
parent
f3b1f97de5
commit
2de6866475
|
@ -116,6 +116,9 @@ public class ApiTestEnvironmentService {
|
|||
}
|
||||
private void checkEnvironmentExist(ApiTestEnvironmentWithBLOBs environment) {
|
||||
if (environment.getName() != null) {
|
||||
if(StringUtils.isEmpty(environment.getProjectId())){
|
||||
MSException.throwException(Translator.get("项目ID不能为空"));
|
||||
}
|
||||
ApiTestEnvironmentExample example = new ApiTestEnvironmentExample();
|
||||
ApiTestEnvironmentExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andNameEqualTo(environment.getName())
|
||||
|
|
|
@ -126,6 +126,10 @@
|
|||
return uploadFiles;
|
||||
},
|
||||
_save(environment) {
|
||||
if(!this.projectId){
|
||||
this.$warning(this.$t('api_test.select_project'));
|
||||
return;
|
||||
}
|
||||
let bodyFiles = this.geFiles(environment);
|
||||
let param = this.buildParam(environment);
|
||||
let url = '/api/environment/add';
|
||||
|
|
Loading…
Reference in New Issue