diff options
author | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
commit | 1f2e173a745da8e4b57f96b5561a3c10054d3b76 (patch) | |
tree | 367f0f07e4fe1269ac0772e0561a4bf912b5153c /models/org_team.go | |
parent | 46e96c008cf966428c9dad71c7871de88186e3fe (diff) | |
download | gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.tar.gz gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.zip |
Refactor User.Id to User.ID
Diffstat (limited to 'models/org_team.go')
-rw-r--r-- | models/org_team.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/org_team.go b/models/org_team.go index 85af2d9838..6a6754cc99 100644 --- a/models/org_team.go +++ b/models/org_team.go @@ -106,7 +106,7 @@ func (t *Team) addRepository(e Engine, repo *Repository) (err error) { return fmt.Errorf("getMembers: %v", err) } for _, u := range t.Members { - if err = watchRepo(e, u.Id, repo.ID, true); err != nil { + if err = watchRepo(e, u.ID, repo.ID, true); err != nil { return fmt.Errorf("watchRepo: %v", err) } } @@ -162,7 +162,7 @@ func (t *Team) removeRepository(e Engine, repo *Repository, recalculate bool) (e continue } - if err = watchRepo(e, u.Id, repo.ID, false); err != nil { + if err = watchRepo(e, u.ID, repo.ID, false); err != nil { return err } } @@ -341,7 +341,7 @@ func DeleteTeam(t *Team) error { } // Delete team-user. - if _, err = sess.Where("org_id=?", org.Id).Where("team_id=?", t.ID).Delete(new(TeamUser)); err != nil { + if _, err = sess.Where("org_id=?", org.ID).Where("team_id=?", t.ID).Delete(new(TeamUser)); err != nil { return err } @@ -538,7 +538,7 @@ func removeTeamMember(e Engine, orgID, teamID, uid int64) error { // This must exist. ou := new(OrgUser) - _, err = e.Where("uid = ?", uid).And("org_id = ?", org.Id).Get(ou) + _, err = e.Where("uid = ?", uid).And("org_id = ?", org.ID).Get(ou) if err != nil { return err } |