fix(接口测试): 修复IF逻辑控制器条件生成错误问题
https://github.com/metersphere/metersphere/issues/22366
This commit is contained in:
parent
d87a2d068c
commit
339d44d2f2
|
@ -102,8 +102,11 @@ public class MsIfController extends MsTestElement {
|
|||
|
||||
public String getCondition() {
|
||||
String key = getContentValue();
|
||||
String variable = (StringUtils.isEmpty(key) || key.equals(this.variable)) || key.startsWith("__V") ?
|
||||
StringUtils.join("\"", this.variable, "\"") : StringUtils.join("vars.get('", key, "')");
|
||||
|
||||
String variable = (StringUtils.isEmpty(key) || key.equals(this.variable)) || key.startsWith("__")
|
||||
? StringUtils.join("\"", this.variable, "\"")
|
||||
: StringUtils.join("vars.get('", key, "')");
|
||||
|
||||
String operator = this.operator;
|
||||
String value;
|
||||
if (StringUtils.equals(operator, "<") || StringUtils.equals(operator, ">")) {
|
||||
|
|
Loading…
Reference in New Issue