mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-18 10:52:56 +02:00
Fix LoadProjects function
This commit is contained in:
parent
57957ecb64
commit
0b78ae4161
@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
// LoadProject load the project the issue was assigned to
|
// LoadProject load the project the issue was assigned to
|
||||||
func (issue *Issue) LoadProjects(ctx context.Context) (err error) {
|
func (issue *Issue) LoadProjects(ctx context.Context) (err error) {
|
||||||
if len(issue.Projects) == 0 {
|
if issue.Projects == nil {
|
||||||
err = db.GetEngine(ctx).Table("project").
|
err = db.GetEngine(ctx).Table("project").
|
||||||
Join("INNER", "project_issue", "project.id=project_issue.project_id").
|
Join("INNER", "project_issue", "project.id=project_issue.project_id").
|
||||||
Where("project_issue.issue_id = ?", issue.ID).Find(&issue.Projects)
|
Where("project_issue.issue_id = ?", issue.ID).Find(&issue.Projects)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user