caicandong 10 月之前
父節點
當前提交
fd836ff68b
No account linked to committer's email address
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      routers/web/repo/issue.go

+ 8
- 2
routers/web/repo/issue.go 查看文件

@@ -518,6 +518,12 @@ func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *repo_model.R
}

func retrieveProjects(ctx *context.Context, repo *repo_model.Repository) {
// Distinguish whether the owner of the repository
// is an individual or an organization
repoOwnerType := project_model.TypeIndividual
if repo.Owner.IsOrganization() {
repoOwnerType = project_model.TypeOrganization
}
var err error
projects, _, err := project_model.FindProjects(ctx, project_model.SearchOptions{
RepoID: repo.ID,
@@ -533,7 +539,7 @@ func retrieveProjects(ctx *context.Context, repo *repo_model.Repository) {
OwnerID: repo.OwnerID,
Page: -1,
IsClosed: util.OptionalBoolFalse,
Type: project_model.TypeOrganization,
Type: repoOwnerType,
})
if err != nil {
ctx.ServerError("GetProjects", err)
@@ -556,7 +562,7 @@ func retrieveProjects(ctx *context.Context, repo *repo_model.Repository) {
OwnerID: repo.OwnerID,
Page: -1,
IsClosed: util.OptionalBoolTrue,
Type: project_model.TypeOrganization,
Type: repoOwnerType,
})
if err != nil {
ctx.ServerError("GetProjects", err)

Loading…
取消
儲存