Skip to content

Commit 940f997

Browse files
CaiCandongGiteaBot
andauthored
Fix label filter between all and no (#26557)
Regression of #25886. # Description For `labelIDs`: https://github.com/go-gitea/gitea/blob/9afcb0e0461aa48a4fbda7740d4c5424911e35ef/routers/web/repo/issue.go#L171-L174 - `nil` mean no filter - `[0]` mean `no label` filter When `selectLabels == "0"`, labelIDs should be `[0]` rather than `nil` # Before: https://github.com/go-gitea/gitea/assets/50507092/3dac5075-6da0-4769-ba20-48a56f4063c0 # After: https://github.com/go-gitea/gitea/assets/50507092/ff79fd4c-b02e-4dfb-9309-ae7851f4dcdb Co-authored-by: Giteabot <[email protected]>
1 parent c179ab4 commit 940f997

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routers/web/repo/issue.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
177177
ctx.Data["AllLabels"] = true
178178
} else if selectLabels == "0" {
179179
ctx.Data["NoLabel"] = true
180-
} else if len(selectLabels) > 0 {
180+
}
181+
if len(selectLabels) > 0 {
181182
labelIDs, err = base.StringsToInt64s(strings.Split(selectLabels, ","))
182183
if err != nil {
183184
ctx.ServerError("StringsToInt64s", err)

0 commit comments

Comments
 (0)