fix(接口测试): 编辑用例-修复环境id为null的缺陷

--bug=1046252 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001046252
This commit is contained in:
teukkk 2024-09-13 17:42:13 +08:00 committed by Craftsman
parent 9aaae2909b
commit fab8e55180
1 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@
detailForm.value = cloneDeep(record as RequestParam);
detailForm.value.name = `copy_${record?.name}`;
detailForm.value.isCopy = true;
environmentId.value = record?.environmentId;
environmentId.value = record?.environmentId ?? environmentId.value;
if (detailForm.value.name.length > 255) {
detailForm.value.name = detailForm.value.name.slice(0, 255);
}
@ -249,7 +249,7 @@
if (!isCopy && record?.id) {
isEdit.value = true;
detailForm.value = cloneDeep(record as RequestParam);
environmentId.value = record.environmentId;
environmentId.value = record.environmentId ?? environmentId.value;
detailForm.value.isNew = false;
}
appStore.hideLoading();