order votes by vote creation

master
Aevann 2023-08-10 20:23:33 +03:00
parent f8dc7b0e58
commit 9127b58a36
1 changed files with 1 additions and 1 deletions

View File

@ -287,7 +287,7 @@ def user_voted(v, username, cls, vote_cls, template, standalone):
total = listing.count() total = listing.count()
listing = listing.order_by(cls.created_utc.desc()).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE).all() listing = listing.order_by(vote_cls.created_utc.desc()).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE).all()
listing = [x.id for x in listing] listing = [x.id for x in listing]
if cls == Post: if cls == Post: