Fix incorrect repository count on organization tab of dashboard (#17256)

Fixes #17249
tokarchuk/v1.17
Jimmy Praet 3 years ago committed by GitHub
parent cd0928f0e8
commit b6147152f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      models/org.go

@ -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").

Loading…
Cancel
Save