From 1b59e6f91011cdeccf146a20f758677143710885 Mon Sep 17 00:00:00 2001 From: Flare Date: Tue, 20 Sep 2016 17:54:47 +0800 Subject: [PATCH] Fix 500 error caused by deleted users on issues (#3675) --- models/issue.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/models/issue.go b/models/issue.go index 208204b0767..3c1e27d7370 100644 --- a/models/issue.go +++ b/models/issue.go @@ -94,13 +94,8 @@ func (issue *Issue) loadAttributes(e Engine) (err error) { if issue.Poster == nil { issue.Poster, err = getUserByID(e, issue.PosterID) if err != nil { - if IsErrUserNotExist(err) { - issue.PosterID = -1 - issue.Poster = NewGhostUser() - } else { - return fmt.Errorf("getUserByID.(poster) [%d]: %v", issue.PosterID, err) - } - return + issue.PosterID = -1 + issue.Poster = NewGhostUser() } }