diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-09-23 04:09:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-22 23:09:29 +0300 |
commit | d9e237e3f268d786af028ba8e7cc24f70a6d6a36 (patch) | |
tree | 4693238439d24459da76c3e8cf6a5ec5afd22898 /models | |
parent | f2e7d5477f076789da5d0e95fe61a56ddb939f5a (diff) | |
download | gitea-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.go | 2 |
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) } |