From 22882d7c04b13979f5cf50f93b4fccbc36df342d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 10 Mar 2017 12:31:50 -0500 Subject: [PATCH] models/user: explicitly select for organization type --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index 752629172..993c69dc0 100644 --- a/models/user.go +++ b/models/user.go @@ -458,7 +458,7 @@ func (u *User) GetOrganizations(showPrivate bool) error { } u.Orgs = make([]*User, 0, len(orgIDs)) - if err = x.In("id", orgIDs).Find(&u.Orgs); err != nil { + if err = x.Where("type = ?", USER_TYPE_ORGANIZATION).In("id", orgIDs).Find(&u.Orgs); err != nil { return err } return nil