0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 09:24:20 +01:00

Fix ghost user bug (#1913)

Fix bug where unassigned issues would appear to be assigned to a ghost user
This commit is contained in:
Ethan Koenig 2017-06-08 21:51:31 -04:00 committed by Lunny Xiao
parent b1b8c5e9f4
commit 73836ce8c4

View file

@ -69,6 +69,9 @@ func (issues IssueList) loadPosters(e Engine) error {
}
for _, issue := range issues {
if issue.PosterID <= 0 {
continue
}
var ok bool
if issue.Poster, ok = posterMaps[issue.PosterID]; !ok {
issue.Poster = NewGhostUser()
@ -176,6 +179,9 @@ func (issues IssueList) loadAssignees(e Engine) error {
}
for _, issue := range issues {
if issue.AssigneeID <= 0 {
continue
}
var ok bool
if issue.Assignee, ok = assigneeMaps[issue.AssigneeID]; !ok {
issue.Assignee = NewGhostUser()