fix(接口测试): 修复包含jsonSchema的数据存为新用例导致页面奔溃的缺陷

https://github.com/metersphere/metersphere/issues/22791
This commit is contained in:
wxg0103 2023-03-16 15:35:57 +08:00 committed by wxg0103
parent 155700dd32
commit 6b09e3b102
2 changed files with 1 additions and 9 deletions

View File

@ -370,7 +370,7 @@ export default {
setOwnEnvironment(scenarioDefinition) {
for (let i in scenarioDefinition) {
let typeArray = ['JDBCPostProcessor', 'JDBCSampler', 'JDBCPreProcessor'];
if (typeArray.indexOf(scenarioDefinition[i].type) !== -1) {
if (typeArray.indexOf(scenarioDefinition[i].type) !== -1 && this.currentScenario) {
scenarioDefinition[i].currentScenarioId = this.currentScenario.id;
}
if (scenarioDefinition[i].hashTree && scenarioDefinition[i].hashTree.length > 0) {

View File

@ -74,14 +74,6 @@ export default {
}
this.mock.mock = this.mock.mock + '';
},
watch: {
schema: {
handler(newValue, oldValue) {
this.schema.mock = this.mock;
},
deep: true,
},
},
mounted() {},
methods: {
funcSearch(queryString, cb) {