mirror of https://github.com/go-gitea/gitea.git
Improve issues.LoadProject (#22982)
issues.LoadProject() is no use change `issues.loadProject(ctx)` to issues.LoadProject(ctx)
This commit is contained in:
parent
cfc7a4efdb
commit
f4ce8c73fb
|
@ -347,7 +347,7 @@ func (issue *Issue) LoadAttributes(ctx context.Context) (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = issue.loadProject(ctx); err != nil {
|
if err = issue.LoadProject(ctx); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// LoadProject load the project the issue was assigned to
|
// LoadProject load the project the issue was assigned to
|
||||||
func (issue *Issue) LoadProject() (err error) {
|
func (issue *Issue) LoadProject(ctx context.Context) (err error) {
|
||||||
return issue.loadProject(db.DefaultContext)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (issue *Issue) loadProject(ctx context.Context) (err error) {
|
|
||||||
if issue.Project == nil {
|
if issue.Project == nil {
|
||||||
var p project_model.Project
|
var p project_model.Project
|
||||||
if _, err = db.GetEngine(ctx).Table("project").
|
if _, err = db.GetEngine(ctx).Table("project").
|
||||||
|
|
Loading…
Reference in New Issue