1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-08 03:27:19 +00:00

Improve loadprojects for issue list (#25468)

This commit is contained in:
Lunny Xiao
2023-06-24 23:31:28 +08:00
committed by GitHub
parent 5eeddfde10
commit 083818cb85
7 changed files with 41 additions and 30 deletions

View File

@ -27,11 +27,6 @@ func (issue *Issue) LoadProject(ctx context.Context) (err error) {
return err
}
// ProjectID return project id if issue was assigned to one
func (issue *Issue) ProjectID() int64 {
return issue.projectID(db.DefaultContext)
}
func (issue *Issue) projectID(ctx context.Context) int64 {
var ip project_model.ProjectIssue
has, err := db.GetEngine(ctx).Where("issue_id=?", issue.ID).Get(&ip)