fix: 500 error on /explore/repos page. (#946)

This commit is contained in:
Bo-Yi Wu 2017-02-15 22:28:11 +08:00 committed by Lunny Xiao
parent 9d2b830275
commit a31f64d639
2 changed files with 21 additions and 23 deletions

View file

@ -192,12 +192,13 @@ func Profile(ctx *context.Context) {
ctx.Data["Total"] = total
} else {
repos, count, err = models.SearchRepositoryByName(&models.SearchRepoOptions{
Keyword: keyword,
OwnerID: ctxUser.ID,
OrderBy: orderBy,
Private: showPrivate,
Page: page,
PageSize: setting.UI.User.RepoPagingNum,
Keyword: keyword,
OwnerID: ctxUser.ID,
OrderBy: orderBy,
Private: showPrivate,
Page: page,
IsProfile: true,
PageSize: setting.UI.User.RepoPagingNum,
})
if err != nil {
ctx.Handle(500, "SearchRepositoryByName", err)