Fix null pointer when viewing repos for an account with revoked credentials.

This commit is contained in:
Mihai Parparita 2015-01-03 14:35:51 -08:00
parent 6b8e347a72
commit c0a76b82a6

View file

@ -118,8 +118,10 @@ func reposAdminHandler(w http.ResponseWriter, r *http.Request) *AppError {
user, _, err := githubClient.Users.Get("")
repos, reposErr := getRepos(c, githubClient, account, user)
if err == nil {
repos.Redact()
}
repos.Redact()
var data = map[string]interface{}{
"User": user,
"Repos": repos,