Skip to content

Commit 73836ce

Browse files
ethantkoeniglunny
authored andcommitted
Fix ghost user bug (#1913)
Fix bug where unassigned issues would appear to be assigned to a ghost user
1 parent b1b8c5e commit 73836ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

models/issue_list.go

+6
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ func (issues IssueList) loadPosters(e Engine) error {
6969
}
7070

7171
for _, issue := range issues {
72+
if issue.PosterID <= 0 {
73+
continue
74+
}
7275
var ok bool
7376
if issue.Poster, ok = posterMaps[issue.PosterID]; !ok {
7477
issue.Poster = NewGhostUser()
@@ -176,6 +179,9 @@ func (issues IssueList) loadAssignees(e Engine) error {
176179
}
177180

178181
for _, issue := range issues {
182+
if issue.AssigneeID <= 0 {
183+
continue
184+
}
179185
var ok bool
180186
if issue.Assignee, ok = assigneeMaps[issue.AssigneeID]; !ok {
181187
issue.Assignee = NewGhostUser()

0 commit comments

Comments
 (0)