mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
fix test
Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
85b93b2438
commit
aa91afbe4a
@ -42,6 +42,8 @@ func (issue *Issue) LoadProjectIssue(ctx context.Context) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue.ProjectIssue.Project = issue.Project
|
||||||
|
|
||||||
return issue.ProjectIssue.LoadProjectColumn(ctx)
|
return issue.ProjectIssue.LoadProjectColumn(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ type ProjectIssue struct { //revive:disable-line:exported
|
|||||||
ID int64 `xorm:"pk autoincr"`
|
ID int64 `xorm:"pk autoincr"`
|
||||||
IssueID int64 `xorm:"INDEX"`
|
IssueID int64 `xorm:"INDEX"`
|
||||||
ProjectID int64 `xorm:"INDEX"`
|
ProjectID int64 `xorm:"INDEX"`
|
||||||
|
Project *Project `xorm:"-"`
|
||||||
|
|
||||||
// ProjectColumnID should not be zero since 1.22. If it's zero, the issue will not be displayed on UI and it might result in errors.
|
// ProjectColumnID should not be zero since 1.22. If it's zero, the issue will not be displayed on UI and it might result in errors.
|
||||||
ProjectColumnID int64 `xorm:"'project_board_id' INDEX"`
|
ProjectColumnID int64 `xorm:"'project_board_id' INDEX"`
|
||||||
@ -70,6 +71,11 @@ func (issue *ProjectIssue) LoadProjectColumn(ctx context.Context) error {
|
|||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
if issue.ProjectColumnID == 0 {
|
||||||
|
issue.ProjectColumn, err = issue.Project.GetDefaultColumn(ctx)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
issue.ProjectColumn, err = GetColumn(ctx, issue.ProjectColumnID)
|
issue.ProjectColumn, err = GetColumn(ctx, issue.ProjectColumnID)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user