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