1
1
Fork 1
mirror of https://github.com/go-gitea/gitea.git synced 2024-06-02 03:46:10 +02:00

Fix problem when database id is not increment as expected (#17124)

This commit is contained in:
Lunny Xiao 2021-09-23 04:09:29 +08:00 committed by GitHub
parent f2e7d5477f
commit d9e237e3f2
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}