fix(接口测试): 缺陷部分富文本图片文件名缺失问题

--bug=1047792 --user=宋昌昌 【缺陷管理】编辑缺陷-点击更新按钮-报SQL异常 https://www.tapd.cn/55049933/s/1596865
This commit is contained in:
song-cc-rock 2024-10-23 18:11:34 +08:00 committed by Craftsman
parent f8052dc622
commit e0a11da813
1 changed files with 2 additions and 1 deletions

View File

@ -645,7 +645,8 @@ public class BugAttachmentService {
addFileMap.put(fileId, fileName);
return localAttachment;
}).toList();
bugLocalAttachmentMapper.batchInsert(localAttachments);
List<BugLocalAttachment> normalAttachments = localAttachments.stream().filter(attachment -> StringUtils.isNotEmpty(attachment.getFileName())).toList();
bugLocalAttachmentMapper.batchInsert(normalAttachments);
// 上传文件到对象存储
LogUtils.info("upload to minio start");
String bugDir = DefaultRepositoryDir.getBugDir(projectId, bugId);