mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 06:54:01 +01:00
bug fixed for 500 caused by get org users (#149)
This commit is contained in:
parent
a8c6698de8
commit
9bf28a2799
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue