summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-02-28 20:08:45 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-03-01 09:08:45 +0800
commit22f7aa6e9c24b8c8b79901e4edf8590935ded93e (patch)
tree42f355647cb90e66dc2df9cc53f07ffcfd692a23 /models
parente83c8afc56c028bddba5074fb945cb0b7c45d32b (diff)
downloadgitea-22f7aa6e9c24b8c8b79901e4edf8590935ded93e.tar.gz
gitea-22f7aa6e9c24b8c8b79901e4edf8590935ded93e.zip
LableIDs -> LabelIDs (#1088)
Diffstat (limited to 'models')
-rw-r--r--models/issue.go12
-rw-r--r--models/pull.go2
2 files changed, 7 insertions, 7 deletions
diff --git a/models/issue.go b/models/issue.go
index d70cf02caa..ca01ffe2fa 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -779,7 +779,7 @@ func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
type NewIssueOptions struct {
Repo *Repository
Issue *Issue
- LableIDs []int64
+ LabelIDs []int64
Attachments []string // In UUID format.
IsPull bool
}
@@ -851,12 +851,12 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) {
return err
}
- if len(opts.LableIDs) > 0 {
+ if len(opts.LabelIDs) > 0 {
// During the session, SQLite3 driver cannot handle retrieve objects after update something.
// So we have to get all needed labels first.
- labels := make([]*Label, 0, len(opts.LableIDs))
- if err = e.In("id", opts.LableIDs).Find(&labels); err != nil {
- return fmt.Errorf("find all labels [label_ids: %v]: %v", opts.LableIDs, err)
+ labels := make([]*Label, 0, len(opts.LabelIDs))
+ if err = e.In("id", opts.LabelIDs).Find(&labels); err != nil {
+ return fmt.Errorf("find all labels [label_ids: %v]: %v", opts.LabelIDs, err)
}
if err = opts.Issue.loadPoster(e); err != nil {
@@ -909,7 +909,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string)
if err = newIssue(sess, issue.Poster, NewIssueOptions{
Repo: repo,
Issue: issue,
- LableIDs: labelIDs,
+ LabelIDs: labelIDs,
Attachments: uuids,
}); err != nil {
return fmt.Errorf("newIssue: %v", err)
diff --git a/models/pull.go b/models/pull.go
index 29730ba7e0..822822411a 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -600,7 +600,7 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
if err = newIssue(sess, pull.Poster, NewIssueOptions{
Repo: repo,
Issue: pull,
- LableIDs: labelIDs,
+ LabelIDs: labelIDs,
Attachments: uuids,
IsPull: true,
}); err != nil {