1
0
mirror of https://github.com/gogs/gogs.git synced 2025-05-31 11:42:13 +00:00

models/user: explicitly select for organization type

This commit is contained in:
Unknwon 2017-03-10 12:31:50 -05:00
parent c3cde864f8
commit 22882d7c04
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3

@ -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