fix: 修改接口用例空指针
This commit is contained in:
parent
7cb3d59d02
commit
51ca545122
|
@ -190,7 +190,7 @@ public class ApiDefinitionService {
|
||||||
.andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath())
|
.andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath())
|
||||||
.andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId());
|
.andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId());
|
||||||
Project project = projectMapper.selectByPrimaryKey(request.getProjectId());
|
Project project = projectMapper.selectByPrimaryKey(request.getProjectId());
|
||||||
if (apiDefinitionMapper.countByExample(example) > 0 && !project.getRepeatable()) {
|
if (apiDefinitionMapper.countByExample(example) > 0 && (project.getRepeatable() == null || !project.getRepeatable())) {
|
||||||
MSException.throwException(Translator.get("api_definition_url_not_repeating"));
|
MSException.throwException(Translator.get("api_definition_url_not_repeating"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -105,8 +105,10 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.response.headers.indexOf("Content-Type: application/json") > 0) {
|
if (this.response.headers.indexOf("Content-Type: application/json") > 0) {
|
||||||
this.$refs.modeDropdown.handleCommand(BODY_FORMAT.JSON);
|
if (this.$refs.modeDropdown) {
|
||||||
this.msCodeReload();
|
this.$refs.modeDropdown.handleCommand(BODY_FORMAT.JSON);
|
||||||
|
this.msCodeReload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
msCodeReload() {
|
msCodeReload() {
|
||||||
|
|
Loading…
Reference in New Issue