diff --git a/models/repo_tag.go b/models/repo_tag.go index 76740bd76..895242bc5 100644 --- a/models/repo_tag.go +++ b/models/repo_tag.go @@ -41,7 +41,7 @@ type TagsDetail struct { TagId int64 TagName string TagLimit int - RepoList []Repository + RepoList []*Repository } func GetTagByID(id int64) (*OfficialTag, error) { @@ -141,8 +141,8 @@ func GetAllOfficialTagRepos(orgID int64, isOwner bool) ([]TagsDetail, error) { return result, nil } -func GetOfficialTagDetail(orgID, tagId int64) ([]Repository, error) { - t := make([]Repository, 0) +func GetOfficialTagDetail(orgID, tagId int64) ([]*Repository, error) { + t := make([]*Repository, 0) const SQLCmd = "select t2.* from official_tag_repos t1 inner join repository t2 on t1.repo_id = t2.id where t1.org_id = ? and t1.tag_id=? order by t2.updated_unix desc" if err := x.SQL(SQLCmd, orgID, tagId).Find(&t); err != nil { diff --git a/routers/org/home.go b/routers/org/home.go index b2c79a54f..aaafec9d8 100755 --- a/routers/org/home.go +++ b/routers/org/home.go @@ -158,7 +158,7 @@ func Home(ctx *context.Context) { if setting.Course.OrgName == org.Name { for _, tag := range tags { for _, repo := range tag.RepoList { - (&repo).GetCreator() + repo.GetCreator() } }