File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,10 @@ func (comments CommentList) loadAssignees(ctx context.Context) error {
225225
226226 for _ , comment := range comments {
227227 comment .Assignee = assignees [comment .AssigneeID ]
228+ if comment .Assignee == nil {
229+ comment .AssigneeID = user_model .GhostUserID
230+ comment .Assignee = user_model .NewGhostUser ()
231+ }
228232 }
229233 return nil
230234}
Original file line number Diff line number Diff line change @@ -159,6 +159,14 @@ func (r *Review) LoadReviewer(ctx context.Context) (err error) {
159159 return err
160160 }
161161 r .Reviewer , err = user_model .GetPossibleUserByID (ctx , r .ReviewerID )
162+ if err != nil {
163+ if ! user_model .IsErrUserNotExist (err ) {
164+ return fmt .Errorf ("GetPossibleUserByID [%d]: %w" , r .ReviewerID , err )
165+ }
166+ r .ReviewerID = user_model .GhostUserID
167+ r .Reviewer = user_model .NewGhostUser ()
168+ return nil
169+ }
162170 return err
163171}
164172
You can’t perform that action at this time.
0 commit comments