summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-07-20 05:10:17 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2018-07-20 10:10:17 +0800
commit0c59edaafa94738b8eaec1620f20887cc35d90e2 (patch)
tree344496bf031508008428db4b9537a68953a44320 /models/org.go
parent1e2da5d396141c9c240151d8736862f7d04aa46f (diff)
downloadgitea-0c59edaafa94738b8eaec1620f20887cc35d90e2.tar.gz
gitea-0c59edaafa94738b8eaec1620f20887cc35d90e2.zip
Update xorm to latest version and fix correct `user` table referencing in sql (#4473)
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/org.go b/models/org.go
index 23f6c58bf6..bd5fc825b8 100644
--- a/models/org.go
+++ b/models/org.go
@@ -383,7 +383,7 @@ func GetOwnedOrgsByUserIDDesc(userID int64, desc string) ([]*User, error) {
func GetOrgUsersByUserID(uid int64, all bool) ([]*OrgUser, error) {
ous := make([]*OrgUser, 0, 10)
sess := x.
- Join("LEFT", "user", "`org_user`.org_id=`user`.id").
+ Join("LEFT", "`user`", "`org_user`.org_id=`user`.id").
Where("`org_user`.uid=?", uid)
if !all {
// Only show public organizations
@@ -575,7 +575,7 @@ func (org *User) getUserTeams(e Engine, userID int64, cols ...string) ([]*Team,
return teams, e.
Where("`team_user`.org_id = ?", org.ID).
Join("INNER", "team_user", "`team_user`.team_id = team.id").
- Join("INNER", "user", "`user`.id=team_user.uid").
+ Join("INNER", "`user`", "`user`.id=team_user.uid").
And("`team_user`.uid = ?", userID).
Asc("`user`.name").
Cols(cols...).