summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-09-23 04:09:29 +0800
committerGitHub <noreply@github.com>2021-09-22 23:09:29 +0300
commitd9e237e3f268d786af028ba8e7cc24f70a6d6a36 (patch)
tree4693238439d24459da76c3e8cf6a5ec5afd22898 /models
parentf2e7d5477f076789da5d0e95fe61a56ddb939f5a (diff)
downloadgitea-d9e237e3f268d786af028ba8e7cc24f70a6d6a36.tar.gz
gitea-d9e237e3f268d786af028ba8e7cc24f70a6d6a36.zip
Fix problem when database id is not increment as expected (#17124)
Diffstat (limited to 'models')
-rw-r--r--models/action.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/action.go b/models/action.go
index f957e2b0cd..f17f75779b 100644
--- a/models/action.go
+++ b/models/action.go
@@ -317,7 +317,7 @@ func GetFeeds(opts GetFeedsOptions) ([]*Action, error) {
actions := make([]*Action, 0, setting.UI.FeedPagingNum)
- if err := db.DefaultContext().Engine().Limit(setting.UI.FeedPagingNum).Desc("id").Where(cond).Find(&actions); err != nil {
+ if err := db.DefaultContext().Engine().Limit(setting.UI.FeedPagingNum).Desc("created_unix").Where(cond).Find(&actions); err != nil {
return nil, fmt.Errorf("Find: %v", err)
}