Browse Source

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

tags/v1.21.12.1
Lunny Xiao Lauris BH 8 years ago
parent
commit
835b890329
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      models/issue_comment.go

+ 8
- 2
models/issue_comment.go 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


Loading…
Cancel
Save