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 e4264168cf..dc1f22da73 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 @@ -83,9 +83,7 @@ public class TestResourcePoolService { return true; } boolean validate = checkNodeOrK8s(testResourceDTO, type, false); - if (!validate) { - testResourcePool.setEnable(false); - } + testResourcePool.setEnable(validate); return validate; } @@ -122,9 +120,7 @@ public class TestResourcePoolService { return true; } boolean validate = checkNodeOrK8s(testResourceDTO, type, true); - if (!validate) { - testResourcePool.setEnable(false); - } + testResourcePool.setEnable(validate); return validate; }