fix(性能测试): 修复创建性能测试偶发的保存后资源池被置空的问题

--bug=1026393 --user=宋天阳 【性能测试】创建测试-选择资源池保存/保存并执行-再次查看测试-资源池为空
https://www.tapd.cn/55049933/s/1376253
This commit is contained in:
song-tianyang 2023-05-26 15:32:45 +08:00 committed by fit2-zhao
parent 20918eaef8
commit dbe946a0cf
1 changed files with 6 additions and 4 deletions

View File

@ -396,10 +396,12 @@ export default {
.then(response => { .then(response => {
this.resourcePools = response.data; this.resourcePools = response.data;
// null // null
if (response.data.filter(p => p.id === this.resourcePool && p.performance).length === 0) { if (this.resourcePool) {
this.resourcePool = null; if (response.data.filter(p => p.id === this.resourcePool && p.performance).length === 0) {
// IDnull this.resourcePool = null;
this.setPoolNull = true; // IDnull
this.setPoolNull = true;
}
} }
this.resourcePoolChange(); this.resourcePoolChange();