diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-06-25 02:15:09 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-06-25 14:15:09 +0800 |
commit | 2559a34b97c4f156a4fec82b03b88a6ba4caeb76 (patch) | |
tree | 915aeaa4ddb5f577ee3445d42f2b94cd578876c7 /routers | |
parent | f64c232953d13043b262dc8da55acb3738e58d15 (diff) | |
download | gitea-2559a34b97c4f156a4fec82b03b88a6ba4caeb76.tar.gz gitea-2559a34b97c4f156a4fec82b03b88a6ba4caeb76.zip |
Load label ID in NewLabels (#2045)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/label.go | 2 | ||||
-rw-r--r-- | routers/repo/issue_label.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go index c22db517c3..c932fb1585 100644 --- a/routers/api/v1/repo/label.go +++ b/routers/api/v1/repo/label.go @@ -64,7 +64,7 @@ func CreateLabel(ctx *context.APIContext, form api.CreateLabelOption) { Color: form.Color, RepoID: ctx.Repo.Repository.ID, } - if err := models.NewLabels(label); err != nil { + if err := models.NewLabel(label); err != nil { ctx.Error(500, "NewLabel", err) return } diff --git a/routers/repo/issue_label.go b/routers/repo/issue_label.go index cfbc2ae3e5..3422677943 100644 --- a/routers/repo/issue_label.go +++ b/routers/repo/issue_label.go @@ -89,7 +89,7 @@ func NewLabel(ctx *context.Context, form auth.CreateLabelForm) { Name: form.Title, Color: form.Color, } - if err := models.NewLabels(l); err != nil { + if err := models.NewLabel(l); err != nil { ctx.Handle(500, "NewLabel", err) return } |