diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2024-02-14 17:31:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 17:31:51 +0100 |
commit | 37061e8266806c0b2b66ac64138e725632b295db (patch) | |
tree | dffc9d35cf2f9988a6ffb1a2866eaf099025362e /models/issues/comment_list.go | |
parent | 4feb91f8574e2363d2120655562e6f09bbf1ffcb (diff) | |
download | gitea-37061e8266806c0b2b66ac64138e725632b295db.tar.gz gitea-37061e8266806c0b2b66ac64138e725632b295db.zip |
Use ghost user if user was not found (#29161)
Fixes #29159
Diffstat (limited to 'models/issues/comment_list.go')
-rw-r--r-- | models/issues/comment_list.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/issues/comment_list.go b/models/issues/comment_list.go index cb7df3270d..30a437ea50 100644 --- a/models/issues/comment_list.go +++ b/models/issues/comment_list.go @@ -225,6 +225,10 @@ func (comments CommentList) loadAssignees(ctx context.Context) error { for _, comment := range comments { comment.Assignee = assignees[comment.AssigneeID] + if comment.Assignee == nil { + comment.AssigneeID = user_model.GhostUserID + comment.Assignee = user_model.NewGhostUser() + } } return nil } |