mirror of
https://github.com/simple-login/app.git
synced 2024-09-29 21:21:29 +02:00
only put pinned alias in default sorting
This commit is contained in:
parent
0075cee1ee
commit
9279b20975
@ -178,8 +178,6 @@ def get_alias_infos_with_pagination_v3(
|
|||||||
elif alias_filter == "hibp":
|
elif alias_filter == "hibp":
|
||||||
q = q.filter(Alias.hibp_breaches.any())
|
q = q.filter(Alias.hibp_breaches.any())
|
||||||
|
|
||||||
q = q.order_by(Alias.pinned.desc())
|
|
||||||
|
|
||||||
if sort == "old2new":
|
if sort == "old2new":
|
||||||
q = q.order_by(Alias.created_at)
|
q = q.order_by(Alias.created_at)
|
||||||
elif sort == "new2old":
|
elif sort == "new2old":
|
||||||
@ -197,6 +195,7 @@ def get_alias_infos_with_pagination_v3(
|
|||||||
],
|
],
|
||||||
else_=Alias.created_at,
|
else_=Alias.created_at,
|
||||||
)
|
)
|
||||||
|
q = q.order_by(Alias.pinned.desc())
|
||||||
q = q.order_by(latest_activity.desc())
|
q = q.order_by(latest_activity.desc())
|
||||||
|
|
||||||
q = list(q.limit(PAGE_LIMIT).offset(page_id * PAGE_LIMIT))
|
q = list(q.limit(PAGE_LIMIT).offset(page_id * PAGE_LIMIT))
|
||||||
|
Loading…
Reference in New Issue
Block a user