Browse Source

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

tags/v1.16.0-rc1
Lunny Xiao 2 years ago
parent
commit
d9e237e3f2
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      models/action.go

+ 1
- 1
models/action.go 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)
}


Loading…
Cancel
Save