mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-02 08:57:32 -04:00
LableIDs -> LabelIDs (#1088)
This commit is contained in:
parent
e83c8afc56
commit
22f7aa6e9c
@ -779,7 +779,7 @@ func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
|
|||||||
type NewIssueOptions struct {
|
type NewIssueOptions struct {
|
||||||
Repo *Repository
|
Repo *Repository
|
||||||
Issue *Issue
|
Issue *Issue
|
||||||
LableIDs []int64
|
LabelIDs []int64
|
||||||
Attachments []string // In UUID format.
|
Attachments []string // In UUID format.
|
||||||
IsPull bool
|
IsPull bool
|
||||||
}
|
}
|
||||||
@ -851,12 +851,12 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(opts.LableIDs) > 0 {
|
if len(opts.LabelIDs) > 0 {
|
||||||
// During the session, SQLite3 driver cannot handle retrieve objects after update something.
|
// During the session, SQLite3 driver cannot handle retrieve objects after update something.
|
||||||
// So we have to get all needed labels first.
|
// So we have to get all needed labels first.
|
||||||
labels := make([]*Label, 0, len(opts.LableIDs))
|
labels := make([]*Label, 0, len(opts.LabelIDs))
|
||||||
if err = e.In("id", opts.LableIDs).Find(&labels); err != nil {
|
if err = e.In("id", opts.LabelIDs).Find(&labels); err != nil {
|
||||||
return fmt.Errorf("find all labels [label_ids: %v]: %v", opts.LableIDs, err)
|
return fmt.Errorf("find all labels [label_ids: %v]: %v", opts.LabelIDs, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = opts.Issue.loadPoster(e); err != nil {
|
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{
|
if err = newIssue(sess, issue.Poster, NewIssueOptions{
|
||||||
Repo: repo,
|
Repo: repo,
|
||||||
Issue: issue,
|
Issue: issue,
|
||||||
LableIDs: labelIDs,
|
LabelIDs: labelIDs,
|
||||||
Attachments: uuids,
|
Attachments: uuids,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return fmt.Errorf("newIssue: %v", err)
|
return fmt.Errorf("newIssue: %v", err)
|
||||||
|
@ -600,7 +600,7 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
|
|||||||
if err = newIssue(sess, pull.Poster, NewIssueOptions{
|
if err = newIssue(sess, pull.Poster, NewIssueOptions{
|
||||||
Repo: repo,
|
Repo: repo,
|
||||||
Issue: pull,
|
Issue: pull,
|
||||||
LableIDs: labelIDs,
|
LabelIDs: labelIDs,
|
||||||
Attachments: uuids,
|
Attachments: uuids,
|
||||||
IsPull: true,
|
IsPull: true,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user