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

This commit is contained in:
Lunny Xiao 2018-01-07 03:13:10 -06:00 committed by Lauris BH
parent 4002328179
commit 835b890329

View file

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