Skip to content

Commit

Permalink
Fix incorrect repository count on organization tab of dashboard (go-g…
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraet authored and Stelios Malathouras committed Oct 15, 2021
1 parent 8e78eeb commit b1db066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func GetUserOrgsList(user *User) ([]*MinimalOrg, error) {
groupByStr := groupByCols.String()
groupByStr = groupByStr[0 : len(groupByStr)-1]

sess.Select(groupByStr+", count(repo_id) as org_count").
sess.Select(groupByStr+", count(distinct repo_id) as org_count").
Table("user").
Join("INNER", "team", "`team`.org_id = `user`.id").
Join("INNER", "team_user", "`team`.id = `team_user`.team_id").
Expand Down

0 comments on commit b1db066

Please sign in to comment.