Fix price ordering
NULL price values were being sorted before cards with prices available.
This commit is contained in:
parent
736a1a07e7
commit
5b6344a695
1 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ async def advanced_search(
|
|||
]
|
||||
if sort_by == "price":
|
||||
orderings = [
|
||||
"CAST(COALESCE(card_prices.usd, card_prices.usd_foil) as decimal) DESC",
|
||||
"CAST(COALESCE(card_prices.usd, card_prices.usd_foil, 0) as decimal) DESC",
|
||||
*orderings,
|
||||
]
|
||||
params["last_update_key"] = "last_update"
|
||||
|
@ -198,7 +198,7 @@ async def advanced_search(
|
|||
f"LIMIT {limit} OFFSET {offset}",
|
||||
]
|
||||
)
|
||||
logger.critical("Query: %s", (query, params))
|
||||
logger.debug("Query: %s", (query, params))
|
||||
await db.execute(query, params)
|
||||
rows = await db.fetchall()
|
||||
|
||||
|
|
Loading…
Reference in a new issue