0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-21 17:01:00 +01:00

LableIDs -> LabelIDs (#1088)

This commit is contained in:
Ethan Koenig 2017-02-28 20:08:45 -05:00 committed by Lunny Xiao
parent e83c8afc56
commit 22f7aa6e9c
2 changed files with 7 additions and 7 deletions

View file

@ -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)

View file

@ -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 {