Skip to content

Commit

Permalink
Fix ghost user bug (#1913)
Browse files Browse the repository at this point in the history
Fix bug where unassigned issues would appear to be assigned to a ghost user
  • Loading branch information
ethantkoenig authored and lunny committed Jun 9, 2017
1 parent b1b8c5e commit 73836ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions models/issue_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 73836ce

Please sign in to comment.