Skip to content

Commit 293a68e

Browse files
committed
fix project list page
1 parent de62b05 commit 293a68e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

routers/web/org/projects.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,18 @@ func Projects(ctx *context.Context) {
5151
page = 1
5252
}
5353

54-
projects, total, err := project_model.FindProjects(ctx, project_model.SearchOptions{
54+
pso := project_model.SearchOptions{
5555
OwnerID: ctx.ContextUser.ID,
5656
Page: page,
5757
IsClosed: util.OptionalBoolOf(isShowClosed),
5858
SortType: sortType,
59-
Type: project_model.TypeOrganization,
60-
})
59+
}
60+
if ctx.ContextUser.IsOrganization() {
61+
pso.Type = project_model.TypeOrganization
62+
} else {
63+
pso.Type = project_model.TypeIndividual
64+
}
65+
projects, total, err := project_model.FindProjects(ctx, pso)
6166
if err != nil {
6267
ctx.ServerError("FindProjects", err)
6368
return

0 commit comments

Comments
 (0)