From 21846d16e517cf0b7f7bed5e595277aab025711f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 28 Nov 2016 09:30:08 +0800 Subject: golint for models/org_team.go --- models/org.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'models/org.go') diff --git a/models/org.go b/models/org.go index 3b04ed578c..4a81814bae 100644 --- a/models/org.go +++ b/models/org.go @@ -41,7 +41,7 @@ func (org *User) GetTeam(name string) (*Team, error) { } func (org *User) getOwnerTeam(e Engine) (*Team, error) { - return org.getTeam(e, OWNER_TEAM) + return org.getTeam(e, ownerTeamName) } // GetOwnerTeam returns owner team of organization. @@ -52,7 +52,7 @@ func (org *User) GetOwnerTeam() (*Team, error) { func (org *User) getTeams(e Engine) error { return e. Where("org_id=?", org.ID). - OrderBy("CASE WHEN name LIKE '" + OWNER_TEAM + "' THEN '' ELSE name END"). + OrderBy("CASE WHEN name LIKE '" + ownerTeamName + "' THEN '' ELSE name END"). Find(&org.Teams) } @@ -140,8 +140,8 @@ func CreateOrganization(org, owner *User) (err error) { // Create default owner team. t := &Team{ OrgID: org.ID, - LowerName: strings.ToLower(OWNER_TEAM), - Name: OWNER_TEAM, + LowerName: strings.ToLower(ownerTeamName), + Name: ownerTeamName, Authorize: AccessModeOwner, NumMembers: 1, } @@ -150,7 +150,7 @@ func CreateOrganization(org, owner *User) (err error) { } if _, err = sess.Insert(&TeamUser{ - Uid: owner.ID, + UID: owner.ID, OrgID: org.ID, TeamID: t.ID, }); err != nil { -- cgit v1.2.3