1
0
Fork 0
forked from forgejo/forgejo

#1419: 500 when visit a issue with issue/comments of deleted user

This commit is contained in:
Unknwon 2015-08-15 02:48:05 +08:00
parent e4d6b5d488
commit 30b428bf0e
5 changed files with 28 additions and 7 deletions

View file

@ -1364,7 +1364,7 @@ func (c *Comment) AfterSet(colName string, _ xorm.Cell) {
if err != nil {
if IsErrUserNotExist(err) {
c.PosterID = -1
c.Poster = &User{Name: "someone"}
c.Poster = NewFakeUser()
} else {
log.Error(3, "GetUserByID[%d]: %v", c.ID, err)
}