File tree 2 files changed +12
-0
lines changed 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 {
225
225
226
226
for _ , comment := range comments {
227
227
comment .Assignee = assignees [comment .AssigneeID ]
228
+ if comment .Assignee == nil {
229
+ comment .AssigneeID = user_model .GhostUserID
230
+ comment .Assignee = user_model .NewGhostUser ()
231
+ }
228
232
}
229
233
return nil
230
234
}
Original file line number Diff line number Diff line change @@ -159,6 +159,14 @@ func (r *Review) LoadReviewer(ctx context.Context) (err error) {
159
159
return err
160
160
}
161
161
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
+ }
162
170
return err
163
171
}
164
172
You can’t perform that action at this time.
0 commit comments