aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_list.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_list.go')
-rw-r--r--models/issue_list.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/models/issue_list.go b/models/issue_list.go
index ede7e8433c..c317f1a157 100644
--- a/models/issue_list.go
+++ b/models/issue_list.go
@@ -69,7 +69,10 @@ func (issues IssueList) loadPosters(e Engine) error {
}
for _, issue := range issues {
- issue.Poster = posterMaps[issue.PosterID]
+ var ok bool
+ if issue.Poster, ok = posterMaps[issue.PosterID]; !ok {
+ issue.Poster = NewGhostUser()
+ }
}
return nil
}
@@ -173,7 +176,10 @@ func (issues IssueList) loadAssignees(e Engine) error {
}
for _, issue := range issues {
- issue.Assignee = assigneeMaps[issue.AssigneeID]
+ var ok bool
+ if issue.Assignee, ok = assigneeMaps[issue.AssigneeID]; !ok {
+ issue.Assignee = NewGhostUser()
+ }
}
return nil
}