fix: 修改接口用例空指针
This commit is contained in:
parent
7cb3d59d02
commit
51ca545122
|
@ -190,7 +190,7 @@ public class ApiDefinitionService {
|
|||
.andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath())
|
||||
.andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId());
|
||||
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"));
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -105,8 +105,10 @@
|
|||
return;
|
||||
}
|
||||
if (this.response.headers.indexOf("Content-Type: application/json") > 0) {
|
||||
this.$refs.modeDropdown.handleCommand(BODY_FORMAT.JSON);
|
||||
this.msCodeReload();
|
||||
if (this.$refs.modeDropdown) {
|
||||
this.$refs.modeDropdown.handleCommand(BODY_FORMAT.JSON);
|
||||
this.msCodeReload();
|
||||
}
|
||||
}
|
||||
},
|
||||
msCodeReload() {
|
||||
|
|
Loading…
Reference in New Issue