server/posts: optimize default sort order

This commit is contained in:
rr- 2016-06-13 23:57:16 +02:00
parent 36eddad424
commit d0aaf8fa8f
2 changed files with 2 additions and 2 deletions

View file

@ -106,7 +106,7 @@ class PostSearchConfig(BaseSearchConfig):
return db.session.query(db.Post)
def finalize_query(self, query):
return query.order_by(db.Post.creation_time.desc())
return query.order_by(db.Post.post_id.desc())
@property
def id_column(self):

View file

@ -35,7 +35,7 @@ def test_retrieving_multiple(test_ctx):
assert result['page'] == 1
assert result['pageSize'] == 100
assert result['total'] == 2
assert [t['id'] for t in result['results']] == [1, 2]
assert [t['id'] for t in result['results']] == [2, 1]
def test_using_special_tokens(
test_ctx, config_injector):