Browse Source

models/user: explicitly select for organization type

pull/4280/head
Unknwon 8 years ago
parent
commit
22882d7c04
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      models/user.go

2
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

Loading…
Cancel
Save