diff options
author | yp05327 | 2023-02-21 04:21:56 +0900 |
---|---|---|
committer | GitHub | 2023-02-20 13:21:56 -0600 |
commit | f4ce8c73fbeadb84daba8c8c68f46f911339b8f8 (patch) | |
tree | ff1165f7185b78b7932f4ea408ccca71272adffd /models | |
parent | cfc7a4efdb7f4654a6d916b10ac8efa73ad6c30c (diff) |
Improve issues.LoadProject (#22982)
issues.LoadProject() is no use
change `issues.loadProject(ctx)` to issues.LoadProject(ctx)
Diffstat (limited to 'models')
-rw-r--r-- | models/issues/issue.go | 2 | ||||
-rw-r--r-- | models/issues/issue_project.go | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/models/issues/issue.go b/models/issues/issue.go index 9d7dea017..6c76909fc 100644 --- a/models/issues/issue.go +++ b/models/issues/issue.go @@ -347,7 +347,7 @@ func (issue *Issue) LoadAttributes(ctx context.Context) (err error) { return } - if err = issue.loadProject(ctx); err != nil { + if err = issue.LoadProject(ctx); err != nil { return } diff --git a/models/issues/issue_project.go b/models/issues/issue_project.go index c9f4c9f53..04d12e055 100644 --- a/models/issues/issue_project.go +++ b/models/issues/issue_project.go @@ -13,11 +13,7 @@ import ( ) // LoadProject load the project the issue was assigned to -func (issue *Issue) LoadProject() (err error) { - return issue.loadProject(db.DefaultContext) -} - -func (issue *Issue) loadProject(ctx context.Context) (err error) { +func (issue *Issue) LoadProject(ctx context.Context) (err error) { if issue.Project == nil { var p project_model.Project if _, err = db.GetEngine(ctx).Table("project"). |