| @@ -455,10 +455,14 @@ func makeIssueResult(sRes *elastic.SearchResult, Key string) *SearchRes { | |||||
| record["id"] = recordSource["id"] | record["id"] = recordSource["id"] | ||||
| record["repo_id"] = recordSource["repo_id"] | record["repo_id"] = recordSource["repo_id"] | ||||
| log.Info("recordSource[\"repo_id\"]=" + fmt.Sprint(recordSource["repo_id"])) | log.Info("recordSource[\"repo_id\"]=" + fmt.Sprint(recordSource["repo_id"])) | ||||
| repo, errRepo := models.GetRepositoryByID(recordSource["repo_id"].(int64)) | |||||
| if errRepo == nil { | |||||
| record["repoUrl"] = repo.FullName() | |||||
| record["avatar"] = repo.RelAvatarLink() | |||||
| repoIdstr := recordSource["repo_id"].(string) | |||||
| repoId, cerr := strconv.ParseInt(repoIdstr, 10, 64) | |||||
| if cerr == nil { | |||||
| repo, errRepo := models.GetRepositoryByID(repoId) | |||||
| if errRepo == nil { | |||||
| record["repoUrl"] = repo.FullName() | |||||
| record["avatar"] = repo.RelAvatarLink() | |||||
| } | |||||
| } | } | ||||
| record["name"] = recordSource["name"] | record["name"] = recordSource["name"] | ||||
| desc := recordSource["content"].(string) | desc := recordSource["content"].(string) | ||||