mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -05:00
Use ghost users in issues/PRs (#1831)
This commit is contained in:
parent
2525195749
commit
367ff327ed
@ -69,7 +69,10 @@ func (issues IssueList) loadPosters(e Engine) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, issue := range issues {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
@ -173,7 +176,10 @@ func (issues IssueList) loadAssignees(e Engine) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, issue := range issues {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user