mirror of
https://github.com/go-gitea/gitea
synced 2024-11-15 06:34:25 +00:00
fix bug when a user delete but assigned on issue (#3318)
This commit is contained in:
parent
4002328179
commit
835b890329
@ -247,15 +247,21 @@ func (c *Comment) LoadAssignees() error {
|
|||||||
if c.OldAssigneeID > 0 {
|
if c.OldAssigneeID > 0 {
|
||||||
c.OldAssignee, err = getUserByID(x, c.OldAssigneeID)
|
c.OldAssignee, err = getUserByID(x, c.OldAssigneeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if !IsErrUserNotExist(err) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
c.OldAssignee = NewGhostUser()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.AssigneeID > 0 {
|
if c.AssigneeID > 0 {
|
||||||
c.Assignee, err = getUserByID(x, c.AssigneeID)
|
c.Assignee, err = getUserByID(x, c.AssigneeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if !IsErrUserNotExist(err) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
c.Assignee = NewGhostUser()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user