Skip to content

Commit 0cf938c

Browse files
committed
Fix bug
1 parent 9ae61bb commit 0cf938c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

models/organization/org_list.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ func GetUserOrgsList(ctx context.Context, user *user_model.User) ([]*MinimalOrg,
112112
Select("team.org_id, COUNT(DISTINCT(team_repo.repo_id)) as repo_count").
113113
Table("team").
114114
Join("INNER", "team_repo", "team_repo.team_id = team.id").
115-
Where(builder.In("`team`.`org_id`", queryUserOrgIDs(user.ID, true))).
115+
Where(builder.In("`team`.`id`",
116+
builder.Select("team_id").From("team_user").
117+
Where(builder.Eq{"uid": user.ID}),
118+
)).
116119
GroupBy("team.org_id").Find(&orgCounts); err != nil {
117120
return nil, err
118121
}

0 commit comments

Comments
 (0)