Browse Source

Dirty hack for #3905

I beileve this is a bug in XORM which wrongly identifies a struct
to inappropriate table name. Also seems to be random.
pull/3781/merge
Unknwon 8 years ago
parent
commit
8f442dde03
No known key found for this signature in database
GPG Key ID: FB9F411CDD69BEC1
  1. 3
      models/org_team.go

3
models/org_team.go

@ -384,7 +384,8 @@ func IsTeamMember(orgID, teamID, uid int64) bool {
func getTeamMembers(e Engine, teamID int64) (_ []*User, err error) {
teamUsers := make([]*TeamUser, 0, 10)
if err = e.Where("team_id=?", teamID).Find(&teamUsers); err != nil {
if err = e.Sql("SELECT `id`, `org_id`, `team_id`, `uid` FROM `team_user` WHERE team_id=?", teamID).
Find(&teamUsers); err != nil {
return nil, fmt.Errorf("get team-users: %v", err)
}
members := make([]*User, 0, len(teamUsers))

Loading…
Cancel
Save