Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix bug
  • Loading branch information
lunny committed Nov 21, 2021
commit 1dc98acd8a89340ace5bc45f89dfc87cb10da78f
4 changes: 2 additions & 2 deletions models/repo_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,9 @@ func searchRepositoryByCondition(opts *SearchRepoOptions, cond builder.Cond) (db
}
}

sess.Where(cond).OrderBy(opts.OrderBy.String())
sess = sess.Where(cond).OrderBy(opts.OrderBy.String())
if opts.PageSize > 0 {
sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize)
sess = sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize)
}
return sess, count, nil
}
Expand Down