aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/home.go
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2021-03-12 03:06:33 +0000
committerGitHub <noreply@github.com>2021-03-12 04:06:33 +0100
commitdf76d9f7ad0bf2f54e3d09d3238d77049226d693 (patch)
treedb6dc03de6d040332101395ad669098fa0463e36 /routers/user/home.go
parenta44b2d01d2188c45242717c69eb277314eb64f00 (diff)
downloadgitea-df76d9f7ad0bf2f54e3d09d3238d77049226d693.tar.gz
gitea-df76d9f7ad0bf2f54e3d09d3238d77049226d693.zip
Show correct issues for team dashboard (#14952)
* fix no items under /org/$org/{issues,pulls}?type=mentioned it was filtering by org id, but org-mentions are not persisted like that to the DB, we need to filter by UID. This means, selecting different teams will only have an effect on the selected repos, otherwise results will be the same, which may be suboptimal. fixes #14941 * don't spam a warning for a perfectly fine request
Diffstat (limited to 'routers/user/home.go')
-rw-r--r--routers/user/home.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index 886c4ab1ba..24aaf00ba8 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -432,9 +432,9 @@ func buildIssueOverview(ctx *context.Context, unitType models.UnitType) {
case models.FilterModeCreate:
opts.PosterID = ctx.User.ID
case models.FilterModeMention:
- opts.MentionedID = ctxUser.ID
+ opts.MentionedID = ctx.User.ID
case models.FilterModeReviewRequested:
- opts.ReviewRequestedID = ctxUser.ID
+ opts.ReviewRequestedID = ctx.User.ID
}
if ctxUser.IsOrganization() {
@@ -709,7 +709,7 @@ func buildIssueOverview(ctx *context.Context, unitType models.UnitType) {
}
func getRepoIDs(reposQuery string) []int64 {
- if len(reposQuery) == 0 {
+ if len(reposQuery) == 0 || reposQuery == "[]" {
return []int64{}
}
if !issueReposQueryPattern.MatchString(reposQuery) {