Skip to content

Commit 65408ff

Browse files
remove bare return
1 parent 1a48694 commit 65408ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

models/organization/team_list.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,13 @@ func GetUserRepoTeams(ctx context.Context, orgID, userID, repoID int64) (teams T
128128

129129
// GetUserGroupTeams returns teams in a group that a user has access to
130130
func GetUserGroupTeams(ctx context.Context, groupID, userID int64) (teams TeamList, err error) {
131-
err = db.GetEngine(ctx).
131+
return teams, db.GetEngine(ctx).
132132
Where("`repo_group_team`.group_id = ?", groupID).
133133
Join("INNER", "repo_group_team", "`repo_group_team`.team_id = `team`.id").
134134
Join("INNER", "team_user", "`team_user`.team_id = `team`.id").
135135
And("`team_user`.uid = ?", userID).
136136
Asc("`team`.name").
137137
Find(&teams)
138-
return
139138
}
140139

141140
func GetTeamsByOrgIDs(ctx context.Context, orgIDs []int64) (TeamList, error) {

0 commit comments

Comments
 (0)