fix hat sorting by owners on non-rdrama sites

pull/146/head
Aevann 2023-05-05 09:06:31 +03:00
parent 60ecfbd65b
commit f5414aa67c
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ def hats(v:User):
if SITE == 'rdrama.net':
hats = sorted(hats.all(), key=lambda x: hat_count.index(x[0].id) if x[0].id in hat_count else 0)
else:
hats = sorted(hats.all(), key=lambda x: hat_count.index(x.id) if x.id in hat_count else 0)
hats = sorted(hats.all(), key=lambda x: hat_count.index(x.id) if x.id in hat_count else 0, reverse=True)
firstrange = PAGE_SIZE * (page - 1)
secondrange = firstrange + PAGE_SIZE