Skip to content

Commit

Permalink
fix: Fix the problem of incorrect judgment error when uploading files
Browse files Browse the repository at this point in the history
  • Loading branch information
1379 authored and 1379 committed Feb 2, 2023
1 parent dd42149 commit f5e7d95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/impl/attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (a *attachmentServiceImpl) Upload(ctx context.Context, fileHeader *multipar
WithStatus(xerr.StatusBadRequest).
WithMsg("附件路径为 " + attachmentDTO.Path + " 已经存在")
}
if err != nil && errors.Is(err, gorm.ErrRecordNotFound) {
if !errors.Is(err, gorm.ErrRecordNotFound) {
return nil, WrapDBErr(err)
}
attachmentEntity := &entity.Attachment{
Expand Down

0 comments on commit f5e7d95

Please sign in to comment.