0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-17 17:32:56 +02:00

Fix LoadProjects function

This commit is contained in:
Tyrone Yeh 2025-05-26 09:04:53 +08:00
parent 57957ecb64
commit 0b78ae4161
No known key found for this signature in database
GPG Key ID: AC8B5AA00375E170

View File

@ -14,7 +14,7 @@ import (
// LoadProject load the project the issue was assigned to
func (issue *Issue) LoadProjects(ctx context.Context) (err error) {
if len(issue.Projects) == 0 {
if issue.Projects == nil {
err = db.GetEngine(ctx).Table("project").
Join("INNER", "project_issue", "project.id=project_issue.project_id").
Where("project_issue.issue_id = ?", issue.ID).Find(&issue.Projects)