瀏覽代碼

Load attachments for code comments (#30124)

Fix #30103

ps: comments has `LoadAttributes`, but maybe considering performance
problem, we don't call it.
tags/v1.22.0-rc0
yp05327 2 月之前
父節點
當前提交
ce3c351226
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. 4
    0
      models/issues/comment_code.go

+ 4
- 0
models/issues/comment_code.go 查看文件

@@ -74,6 +74,10 @@ func findCodeComments(ctx context.Context, opts FindCommentsOptions, issue *Issu
return nil, err
}

if err := comments.LoadAttachments(ctx); err != nil {
return nil, err
}

// Find all reviews by ReviewID
reviews := make(map[int64]*Review)
ids := make([]int64, 0, len(comments))

Loading…
取消
儲存