Fix sort by rate.

2024-05-20_merge
tecnovert 4 years ago
parent 088e1f4411
commit c5faaeccf8
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
  1. 3
      basicswap/basicswap.py

@ -4648,7 +4648,8 @@ class BasicSwap(BaseApp):
q = q.filter(Offer.coin_to == int(filter_coin_to))
order_dir = filters.get('sort_dir', 'desc')
order_by = filters.get('order_by', 'created_at')
order_by = filters.get('sort_by', 'created_at')
if order_by == 'created_at':
q = q.order_by(Offer.created_at.desc() if order_dir == 'desc' else Offer.created_at.asc())
elif order_by == 'rate':

Loading…
Cancel
Save