mirror of https://github.com/go-gitea/gitea.git
parent
dd8bc1d61d
commit
d823465d94
|
@ -225,6 +225,10 @@ func (comments CommentList) loadAssignees(ctx context.Context) error {
|
||||||
|
|
||||||
for _, comment := range comments {
|
for _, comment := range comments {
|
||||||
comment.Assignee = assignees[comment.AssigneeID]
|
comment.Assignee = assignees[comment.AssigneeID]
|
||||||
|
if comment.Assignee == nil {
|
||||||
|
comment.AssigneeID = user_model.GhostUserID
|
||||||
|
comment.Assignee = user_model.NewGhostUser()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,14 @@ func (r *Review) LoadReviewer(ctx context.Context) (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
r.Reviewer, err = user_model.GetPossibleUserByID(ctx, r.ReviewerID)
|
r.Reviewer, err = user_model.GetPossibleUserByID(ctx, r.ReviewerID)
|
||||||
|
if err != nil {
|
||||||
|
if !user_model.IsErrUserNotExist(err) {
|
||||||
|
return fmt.Errorf("GetPossibleUserByID [%d]: %w", r.ReviewerID, err)
|
||||||
|
}
|
||||||
|
r.ReviewerID = user_model.GhostUserID
|
||||||
|
r.Reviewer = user_model.NewGhostUser()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue