fix bug when a user delete but assigned on issue (#3318)

tokarchuk/v1.17
Lunny Xiao 7 years ago committed by Lauris BH
parent 4002328179
commit 835b890329
  1. 6
      models/issue_comment.go

@ -247,15 +247,21 @@ func (c *Comment) LoadAssignees() error {
if c.OldAssigneeID > 0 {
c.OldAssignee, err = getUserByID(x, c.OldAssigneeID)
if err != nil {
if !IsErrUserNotExist(err) {
return err
}
c.OldAssignee = NewGhostUser()
}
}
if c.AssigneeID > 0 {
c.Assignee, err = getUserByID(x, c.AssigneeID)
if err != nil {
if !IsErrUserNotExist(err) {
return err
}
c.Assignee = NewGhostUser()
}
}
return nil
}

Loading…
Cancel
Save