From 7450a4538473b4e7a4413ecfd75ba8eaf23e38fe Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 14 Oct 2024 14:06:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=B1=A0=E6=9B=B4=E6=96=B0=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/TestResourcePoolService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java index 327e312583..0ea1d3e0e2 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java @@ -111,9 +111,11 @@ public class TestResourcePoolService { if (CollectionUtils.isEmpty(testResourceDTO.getNodesList())) { testResourceDTO.setNodesList(new ArrayList<>()); } - TestResourcePoolValidateService testResourcePoolValidateService = CommonBeanFactory.getBean(TestResourcePoolValidateService.class); - if (testResourcePoolValidateService != null) { - testResourcePoolValidateService.validateNodeList(testResourceDTO.getNodesList()); + if (StringUtils.equalsIgnoreCase(testResourcePool.getType(), ResourcePoolTypeEnum.NODE.name())){ + TestResourcePoolValidateService testResourcePoolValidateService = CommonBeanFactory.getBean(TestResourcePoolValidateService.class); + if (testResourcePoolValidateService != null) { + testResourcePoolValidateService.validateNodeList(testResourceDTO.getNodesList()); + } } String configuration = JSON.toJSONString(testResourceDTO); TestResourcePoolBlob testResourcePoolBlob = new TestResourcePoolBlob();