1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 09:55:20 +02:00

Return empty when searching issues with no repos (#26545)

This commit is contained in:
Jason Song 2023-08-18 01:42:17 +08:00 committed by GitHub
parent 47fddaadc8
commit b658f2c61b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 5 deletions

View file

@ -2503,6 +2503,10 @@ func SearchIssues(ctx *context.Context) {
ctx.Error(http.StatusInternalServerError, "SearchRepositoryIDs", err.Error())
return
}
if len(repoIDs) == 0 {
// no repos found, don't let the indexer return all repos
repoIDs = []int64{0}
}
}
keyword := ctx.FormTrim("q")