From 6e75c66673e5410dd65308d2834d8c13641fd318 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 23 Dec 2020 17:34:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/definition/request/sampler/MsHTTPSamplerProxy.java | 4 +++- .../components/api/automation/scenario/AddBasisScenario.vue | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index de84c2c899..d1a995ea92 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -110,7 +110,9 @@ public class MsHTTPSamplerProxy extends MsTestElement { if (useEnvironment != null) { ApiTestEnvironmentService environmentService = CommonBeanFactory.getBean(ApiTestEnvironmentService.class); ApiTestEnvironmentWithBLOBs environment = environmentService.get(useEnvironment); - config.setConfig(JSONObject.parseObject(environment.getConfig(), EnvironmentConfig.class)); + if (environment != null && environment.getConfig() != null) { + config.setConfig(JSONObject.parseObject(environment.getConfig(), EnvironmentConfig.class)); + } } try { if (config != null && config.getConfig() != null) { diff --git a/frontend/src/business/components/api/automation/scenario/AddBasisScenario.vue b/frontend/src/business/components/api/automation/scenario/AddBasisScenario.vue index da9c05c887..a95be114ee 100644 --- a/frontend/src/business/components/api/automation/scenario/AddBasisScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/AddBasisScenario.vue @@ -1,5 +1,5 @@