fix(接口定义): 修复环境变量优先于场景变量的缺陷 (#18053)

--bug=1016781 --user=王孝刚 【接口测试】github#17873,最新版本环境变量优先级大于了场景变量
https://www.tapd.cn/55049933/s/1246281

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-09-20 11:46:35 +08:00 committed by GitHub
parent d3b52e2597
commit 85849f2108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -849,8 +849,8 @@ public class ElementUtil {
}
});
// 清空变量防止重复添加
config.getConfig().get(projectId).getCommonConfig().getVariables().remove(constants);
config.getConfig().get(projectId).getCommonConfig().getVariables().remove(variableList);
config.getConfig().get(projectId).getCommonConfig().getVariables().removeAll(constants);
config.getConfig().get(projectId).getCommonConfig().getVariables().removeAll(variableList);
}
if (arguments.getArguments() != null && arguments.getArguments().size() > 0) {