pin deleted and removed objects to the bottom to prevent bloat

pull/195/head
Aevann 2023-08-13 17:35:57 +03:00
parent b06fc47a02
commit 98221cbd57
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@ def apply_time_filter(t, objects, cls):
def sort_objects(sort, objects, cls):
objects = objects.order_by(cls.is_banned, cls.deleted_utc)
if sort == 'hot':
ti = int(time.time()) + 3600
metric = cls.realupvotes