text-order-by-fix
This commit is contained in:
parent
afe710d955
commit
f5ebd0ada9
|
@ -243,11 +243,8 @@ async def load_shouts_feed(_, info, options):
|
||||||
q = apply_filters(q, filters, reader_id)
|
q = apply_filters(q, filters, reader_id)
|
||||||
|
|
||||||
# sort order
|
# sort order
|
||||||
order_by = options.get(
|
order_by = options.get("order_by")
|
||||||
"order_by",
|
order_by = text(order_by) if order_by else Shout.featured_at if filters.get("featured") else Shout.published_at
|
||||||
Shout.featured_at if filters.get("featured") else Shout.published_at,
|
|
||||||
)
|
|
||||||
|
|
||||||
query_order_by = desc(order_by) if options.get("order_by_desc", True) else asc(order_by)
|
query_order_by = desc(order_by) if options.get("order_by_desc", True) else asc(order_by)
|
||||||
|
|
||||||
# pagination
|
# pagination
|
||||||
|
|
Loading…
Reference in New Issue
Block a user