diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/organization/team_repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/organization/team_repo.go b/models/organization/team_repo.go index 03ca4678a5..657e83aaa5 100644 --- a/models/organization/team_repo.go +++ b/models/organization/team_repo.go @@ -48,7 +48,7 @@ func GetTeamRepositories(ctx context.Context, opts *SearchTeamRepoOptions) ([]*r ) } if opts.PageSize > 0 { - sess.Limit(opts.PageSize, opts.Page*opts.PageSize) + sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize) } var repos []*repo_model.Repository return repos, sess.OrderBy("repository.name"). |