mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 06:05:30 +02:00
Only update poster in issue/comment list if it has been loaded (#31216)
Previously, all posters were updated, even if they were not part of posterMaps. In that case, a ghost user was erroneously inserted. Fixes #31213.
This commit is contained in:
1 parent
ab458ce10b
commit
3cc7f763c3
2 files changed
+6
-2
No files matched your search
@@ -32,7 +32,9 @@ func (comments CommentList) LoadPosters(ctx context.Context) error {
|
||||
}
|
||||
|
||||
for _, comment := range comments {
|
||||
comment.Poster = getPoster(comment.PosterID, posterMaps)
|
||||
if comment.Poster == nil {
|
||||
comment.Poster = getPoster(comment.PosterID, posterMaps)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user