From 710c7cb5580c905a17d7ae34419673e71c3ec856 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 1 Apr 2021 16:33:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D1.5.0=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E4=B8=8A=E6=9D=A5=E7=9A=84=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=EF=BC=8C=E8=BD=AC=E5=9C=BA=E6=99=AF=E5=90=8E=EF=BC=8C=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E6=89=A7=E8=A1=8C=E5=9C=BA=E6=99=AF=E3=80=82=E5=9C=A8?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=98=E9=87=8F=E4=B8=AD=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=8F=82=E6=95=B0=E6=B2=A1=E6=9C=89=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E5=88=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/dto/definition/request/variable/ScenarioVariable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/variable/ScenarioVariable.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/variable/ScenarioVariable.java index ab87eaaa13..22f4f6b183 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/variable/ScenarioVariable.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/variable/ScenarioVariable.java @@ -52,7 +52,7 @@ public class ScenarioVariable { } public boolean isConstantValid() { - if (StringUtils.equals(this.type, VariableTypeConstants.CONSTANT.name()) && StringUtils.isNotEmpty(name) && StringUtils.isNotEmpty(value)) { + if ((StringUtils.isEmpty(this.type) || StringUtils.equals(this.type, VariableTypeConstants.CONSTANT.name())) && StringUtils.isNotEmpty(name) && StringUtils.isNotEmpty(value)) { return true; } return false;