diff --git a/routers/user/home.go b/routers/user/home.go index 8b3155ea0bf..6b71c51de32 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -538,13 +538,17 @@ func Issues(ctx *context.Context) { } } - issueStats, err := models.GetUserIssueStats(models.UserIssueStatsOptions{ + issueStatsOpts := models.UserIssueStatsOptions{ UserID: ctxUser.ID, UserRepoIDs: userRepoIDs, FilterMode: filterMode, IsPull: isPullList, IsClosed: isShowClosed, - }) + } + if len(repoIDs) > 0 { + issueStatsOpts.UserRepoIDs = repoIDs + } + issueStats, err := models.GetUserIssueStats(issueStatsOpts) if err != nil { ctx.ServerError("GetUserIssueStats", err) return