From 0c4ce0f83110131e6f8bab40c800695598e9f69f Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 12 Oct 2022 15:00:15 +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=E5=9C=BA=E6=99=AF=E5=88=97=E8=A1=A8=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=BB=93=E6=9E=9C=E9=87=8D=E7=BD=AE=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017842 --user=王孝刚 【接口测试】接口自动化-执行结果-重置无效 https://www.tapd.cn/55049933/s/1259526 --- .../io/metersphere/service/scenario/ApiScenarioService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java index a0ae990af6..48b812cdc7 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java @@ -209,10 +209,10 @@ public class ApiScenarioService { } if (MapUtils.isNotEmpty(request.getFilters()) && request.getFilters().containsKey(ApiTestConstants.LAST_RESULT)) { - if (request.getFilters().get(ApiTestConstants.LAST_RESULT).contains(ApiReportStatus.PENDING.name())) { + if (request.getFilters().get(ApiTestConstants.LAST_RESULT) != null && request.getFilters().get(ApiTestConstants.LAST_RESULT).contains(ApiReportStatus.PENDING.name())) { request.getFilters().get(ApiTestConstants.LAST_RESULT).add(""); } - if (request.getFilters().get(ApiTestConstants.LAST_RESULT).contains(ApiTestConstants.FAKE_ERROR)) { + if (request.getFilters().get(ApiTestConstants.LAST_RESULT) != null && request.getFilters().get(ApiTestConstants.LAST_RESULT).contains(ApiTestConstants.FAKE_ERROR)) { request.getFilters().get(ApiTestConstants.LAST_RESULT).add(ApiReportStatus.FAKE_ERROR.name()); } }