Merge pull request #218

fix(tools:currency-converter): currency list displaying oldest result instead of newest
This commit is contained in:
Herculino Trotta
2025-03-13 22:18:21 -03:00
committed by GitHub

View File

@@ -40,7 +40,7 @@ def get_currency_exchange_map(date=None) -> Dict[str, dict]:
date_diff=Func(Extract(F("date") - Value(date), "epoch"), function="ABS"),
effective_rate=F("rate"),
)
.order_by("from_currency", "to_currency", "date_diff")
.order_by("from_currency", "to_currency", "-date_diff")
.distinct()
)