From 685ca095d1f764ca5c0ddeda4ef9e5ee14d65969 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 28 Sep 2023 09:48:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=BB=84=E7=BB=87=E9=A1=B9=E7=9B=AE=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/system/service/BaseUserService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserService.java index 486d0eda92..7568b2b9c1 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserService.java @@ -265,6 +265,7 @@ public class BaseUserService { if (StringUtils.equals("organization", sign)) { user.setLastOrganizationId(sourceId); sessionUser.setLastOrganizationId(sourceId); + user.setLastProjectId(StringUtils.EMPTY); List projects = getProjectListByWsAndUserId(sessionUser.getId(), sourceId); if (CollectionUtils.isNotEmpty(projects)) { user.setLastProjectId(projects.get(0).getId()); @@ -276,8 +277,6 @@ public class BaseUserService { if (CollectionUtils.isNotEmpty(allWsProject)) { user.setLastProjectId(allWsProject.get(0).getId()); } - } else { - user.setLastProjectId(StringUtils.EMPTY); } } }