models/user: explicitly select for organization type

pull/4280/head
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
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,7 @@ func (u *User) GetOrganizations(showPrivate bool) error {
} }
u.Orgs = make([]*User, 0, len(orgIDs)) 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 err
} }
return nil return nil