Skip to content

Commit

Permalink
Ensure trending scenes order across pagination (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
peolic authored Feb 14, 2022
1 parent c5ac615 commit 943470d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sqlx/querybuilder_scene.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (qb *sceneQueryBuilder) buildQuery(filter models.SceneQueryInput, isCount b
` + limit + `
) T ON scenes.id = T.scene_id
`
query.Sort = " ORDER BY T.count DESC "
query.Sort = " ORDER BY T.count DESC, T.scene_id DESC "
} else {
query.Sort = qb.getSceneSort(filter)
query.Pagination = getPagination(filter.Page, filter.PerPage)
Expand Down

0 comments on commit 943470d

Please sign in to comment.