diff options
author | Ethan Koenig <etk39@cornell.edu> | 2016-12-22 03:58:04 -0500 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-22 16:58:04 +0800 |
commit | 4c89a9c33c4c097836f5bfa79cc7e5adc142a2f0 (patch) | |
tree | a09bfe9d886ebcd5145a17d15c945b0b14e2bc53 /routers | |
parent | df7fa4e9959ab23fd94c3475d0860af810936e88 (diff) | |
download | gitea-4c89a9c33c4c097836f5bfa79cc7e5adc142a2f0.tar.gz gitea-4c89a9c33c4c097836f5bfa79cc7e5adc142a2f0.zip |
Bug fixes and tests for modules/base (#442)
Also address other TODOs
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index e3c088d940..343b93e273 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -374,7 +374,10 @@ func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm) ([]int64 } // Check labels. - labelIDs := base.StringsToInt64s(strings.Split(form.LabelIDs, ",")) + labelIDs, err := base.StringsToInt64s(strings.Split(form.LabelIDs, ",")) + if err != nil { + return nil, 0, 0 + } labelIDMark := base.Int64sToMap(labelIDs) hasSelected := false for i := range labels { |