mirror of
https://github.com/gogs/gogs.git
synced 2026-01-19 13:52:21 +01:00
models/user: explicitly select for organization type
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user