aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 23f2480dda..6e04288c2b 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -742,7 +742,15 @@ func UpdateLabel(ctx *middleware.Context, params martini.Params, form auth.Creat
}
func DeleteLabel(ctx *middleware.Context) {
- strIds := strings.Split(ctx.Query("remove"), ",")
+ removes := ctx.Query("remove")
+ if len(strings.TrimSpace(removes)) == 0 {
+ ctx.JSON(200, map[string]interface{}{
+ "ok": true,
+ })
+ return
+ }
+
+ strIds := strings.Split(removes, ",")
for _, strId := range strIds {
if err := models.DeleteLabel(ctx.Repo.Repository.Id, strId); err != nil {
ctx.Handle(500, "issue.DeleteLabel(DeleteLabel)", err)