From a8765a2ef63b9e3f3d36de0f04863f3ee81e4577 Mon Sep 17 00:00:00 2001 From: Jianguo-Genius Date: Wed, 11 Dec 2024 18:05:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E7=8E=87=E8=B7=B3=E8=BD=AC=E6=97=B6=E7=9A=84=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/definition/ApiDefinitionService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionService.java index a4b005ca99..d0baf8abba 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionService.java @@ -189,7 +189,11 @@ public class ApiDefinitionService extends MoveNodeService { private List selectApiIdInCaseAndScenarioStep(String projectId, List protocols) { List apiInCase = this.selectApiIdInCase(projectId, protocols); List apiInScenarioStep = this.selectApiIdInScenarioStep(projectId, protocols, apiInCase); - return ListUtils.union(apiInCase, apiInScenarioStep); + List returnList = ListUtils.union(apiInCase, apiInScenarioStep); + if (returnList.isEmpty()) { + returnList.add("nonePrepared"); + } + return returnList; } private List selectApiIdInCase(String projectId, List protocols) {