Browse Source

Fix ghost user bug (#1913)

Fix bug where unassigned issues would appear to be assigned to a ghost user
tags/v1.21.12.1
Ethan Koenig Lunny Xiao 8 years ago
parent
commit
73836ce8c4
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      models/issue_list.go

+ 6
- 0
models/issue_list.go 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()


Loading…
Cancel
Save