fix: 创建测试计划报错
This commit is contained in:
parent
83ef71276a
commit
fd6bd5dd7c
|
@ -202,12 +202,14 @@ public class TestPlanService {
|
||||||
|
|
||||||
String planId = testPlan.getId();
|
String planId = testPlan.getId();
|
||||||
List<String> principals = testPlan.getPrincipals();
|
List<String> principals = testPlan.getPrincipals();
|
||||||
|
if (!CollectionUtils.isEmpty(principals)) {
|
||||||
for (String principal : principals) {
|
for (String principal : principals) {
|
||||||
TestPlanPrincipal testPlanPrincipal = new TestPlanPrincipal();
|
TestPlanPrincipal testPlanPrincipal = new TestPlanPrincipal();
|
||||||
testPlanPrincipal.setTestPlanId(planId);
|
testPlanPrincipal.setTestPlanId(planId);
|
||||||
testPlanPrincipal.setPrincipalId(principal);
|
testPlanPrincipal.setPrincipalId(principal);
|
||||||
testPlanPrincipalService.insert(testPlanPrincipal);
|
testPlanPrincipalService.insert(testPlanPrincipal);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isBlank(testPlan.getProjectId())) {
|
if (StringUtils.isBlank(testPlan.getProjectId())) {
|
||||||
testPlan.setProjectId(SessionUtils.getCurrentProjectId());
|
testPlan.setProjectId(SessionUtils.getCurrentProjectId());
|
||||||
|
|
Loading…
Reference in New Issue