0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 20:54:52 +01:00

Load attachments for code comments (#30124)

Fix #30103

ps: comments has `LoadAttributes`, but maybe considering performance
problem, we don't call it.
This commit is contained in:
yp05327 2024-03-27 13:44:26 +09:00 committed by GitHub
parent a9e5706696
commit ce3c351226
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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))