From 58eef7235ba0bbe0c7d0f96455e2812acd566335 Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Mon, 24 Jan 2022 18:25:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E4=BE=8B=E4=BF=9D=E5=AD=98500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/track/service/TestCaseService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 5ee87a9cc7..ad32d767a5 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -2452,6 +2452,8 @@ public class TestCaseService { * @param versionId */ private void checkAndSetLatestVersion(String refId, String versionId, String projectId) { + if (StringUtils.isAnyBlank(refId, versionId, projectId)) + return; TestCaseExample e = new TestCaseExample(); e.createCriteria().andRefIdEqualTo(refId).andLatestEqualTo(true); //如果因为删除导致没有了最新的版本,则按照版本创建顺序选择一个版本为最新版本