Skip to content

Commit ebccf6c

Browse files
committed
Fix test
1 parent 1dc98ac commit ebccf6c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

models/org.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ func GetUserOrgsList(user *User) ([]*MinimalOrg, error) {
486486
groupByStr = groupByStr[0 : len(groupByStr)-1]
487487

488488
sess := db.GetEngine(db.DefaultContext)
489-
sess.Select(groupByStr+", count(distinct repo_id) as org_count").
489+
sess = sess.Select(groupByStr+", count(distinct repo_id) as org_count").
490490
Table("user").
491491
Join("INNER", "team", "`team`.org_id = `user`.id").
492492
Join("INNER", "team_user", "`team`.id = `team_user`.team_id").

models/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ func GetUserRepositories(opts *SearchRepoOptions) ([]*Repository, int64, error)
17771777
return nil, 0, fmt.Errorf("Count: %v", err)
17781778
}
17791779

1780-
sess.Where(cond).OrderBy(opts.OrderBy.String())
1780+
sess = sess.Where(cond).OrderBy(opts.OrderBy.String())
17811781
repos := make([]*Repository, 0, opts.PageSize)
17821782
return repos, count, db.SetSessionPagination(sess, opts).Find(&repos)
17831783
}

0 commit comments

Comments
 (0)