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:
parent
c3cde864f8
commit
22882d7c04
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user