fix: 批量修改场景环境报错
This commit is contained in:
parent
0f67b6fc9f
commit
eb97cbeb25
|
@ -707,7 +707,9 @@ public class ApiAutomationService {
|
||||||
apiScenarios.forEach(item -> {
|
apiScenarios.forEach(item -> {
|
||||||
JSONObject object = JSONObject.parseObject(item.getScenarioDefinition());
|
JSONObject object = JSONObject.parseObject(item.getScenarioDefinition());
|
||||||
object.put("environmentId", request.getEnvironmentId());
|
object.put("environmentId", request.getEnvironmentId());
|
||||||
|
if (object != null) {
|
||||||
item.setScenarioDefinition(JSONObject.toJSONString(object));
|
item.setScenarioDefinition(JSONObject.toJSONString(object));
|
||||||
|
}
|
||||||
apiScenarioMapper.updateByPrimaryKeySelective(item);
|
apiScenarioMapper.updateByPrimaryKeySelective(item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue