mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 20:43:24 +02:00
fix(db): make paginated database reads always require "order" option (#39017)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
0bed1232ee
commit
1c16f04bf5
29 files changed
+161
-65
No files matched your search
@@ -236,7 +236,7 @@ func (opts SearchOptions) ToConds() builder.Cond {
|
||||
}
|
||||
|
||||
func (opts SearchOptions) ToOrders() string {
|
||||
return opts.OrderBy.String()
|
||||
return util.IfZero(opts.OrderBy.String(), "id")
|
||||
}
|
||||
|
||||
func GetSearchOrderByBySortType(sortType string) db.SearchOrderBy {
|
||||
|
||||
Reference in new issue
Block a user