diff options
author | Jimmy Praet <jimmy.praet@telenet.be> | 2021-10-08 08:49:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 08:49:20 +0200 |
commit | b6147152f8a60db3d1b4c134280afa3e9f77e3bc (patch) | |
tree | 8e7b185825eebdc85bb0248447c2d93a1c853a57 /models/org.go | |
parent | cd0928f0e8cdfada471507de4e2921f92d716cd6 (diff) | |
download | gitea-b6147152f8a60db3d1b4c134280afa3e9f77e3bc.tar.gz gitea-b6147152f8a60db3d1b4c134280afa3e9f77e3bc.zip |
Fix incorrect repository count on organization tab of dashboard (#17256)
Fixes #17249
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/org.go b/models/org.go index 94939d2c74..eadd1e157c 100644 --- a/models/org.go +++ b/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"). |