mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
@ -187,8 +187,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption opt
|
||||
if len(selectLabels) > 0 {
|
||||
labelIDs, err = base.StringsToInt64s(strings.Split(selectLabels, ","))
|
||||
if err != nil {
|
||||
ctx.ServerError("StringsToInt64s", err)
|
||||
return
|
||||
ctx.Flash.Error(ctx.Tr("invalid_data", selectLabels), true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -529,17 +529,14 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
|
||||
|
||||
// Get IDs for labels (a filter option for issues/pulls).
|
||||
// Required for IssuesOptions.
|
||||
var labelIDs []int64
|
||||
selectedLabels := ctx.FormString("labels")
|
||||
if len(selectedLabels) > 0 && selectedLabels != "0" {
|
||||
var err error
|
||||
labelIDs, err = base.StringsToInt64s(strings.Split(selectedLabels, ","))
|
||||
opts.LabelIDs, err = base.StringsToInt64s(strings.Split(selectedLabels, ","))
|
||||
if err != nil {
|
||||
ctx.ServerError("StringsToInt64s", err)
|
||||
return
|
||||
ctx.Flash.Error(ctx.Tr("invalid_data", selectedLabels), true)
|
||||
}
|
||||
}
|
||||
opts.LabelIDs = labelIDs
|
||||
|
||||
// ------------------------------
|
||||
// Get issues as defined by opts.
|
||||
|
@ -268,8 +268,7 @@ func NotificationSubscriptions(ctx *context.Context) {
|
||||
var err error
|
||||
labelIDs, err = base.StringsToInt64s(strings.Split(selectedLabels, ","))
|
||||
if err != nil {
|
||||
ctx.ServerError("StringsToInt64s", err)
|
||||
return
|
||||
ctx.Flash.Error(ctx.Tr("invalid_data", selectedLabels), true)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user