Browse Source

bug fixed for 500 caused by get org users (#149)

tags/v1.2.0-rc1
Lunny Xiao GitHub 9 years ago
parent
commit
abaec03e67
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      models/org.go

+ 2
- 2
models/org.go View File

@@ -323,8 +323,8 @@ 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`).
Where(`"org_user".uid=?`, uid)
Join("LEFT", "user", "`org_user`.org_id=`user`.id").
Where("`org_user`.uid=?", uid)
if !all {
// Only show public organizations
sess.And("is_public=?", true)


Loading…
Cancel
Save