fix 修复全局变量和工作空间变量可能冲突的问题

This commit is contained in:
bwcx_jzy 2022-09-09 13:40:27 +08:00
parent 4fd464a8e1
commit 582444ed6b
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
2 changed files with 4 additions and 1 deletions

View File

@ -10,6 +10,7 @@
2. 【server】修复全局变量编辑中不能选择分发节点
3. 【server】修复跨工作空间同步数据不能正常使用问题感谢@ccx2480
4. 【server】修复 SVN 仓库无法构建问题(感谢@Tʀsᴛ¹⁹⁹¹
5. 【server】修复全局变量和工作空间变量可能冲突的问题
------

View File

@ -192,7 +192,9 @@ public class WorkspaceEnvVarController extends BaseServerController {
//
Entity entity = Entity.create();
entity.set("name", name);
entity.set("workspaceId", CollUtil.newArrayList(workspaceId, ServerConst.WORKSPACE_GLOBAL));
if (!StrUtil.equals(workspaceId, ServerConst.WORKSPACE_GLOBAL)) {
entity.set("workspaceId", CollUtil.newArrayList(workspaceId, ServerConst.WORKSPACE_GLOBAL));
}
if (StrUtil.isNotEmpty(id)) {
entity.set("id", StrUtil.format(" <> {}", id));
}