fix(chart): Fixed sorting by date
Some checks failed
Create and publish a Docker image / build-and-push-server (push) Has been cancelled
Create and publish a Docker image / build-and-push-chart (push) Has been cancelled
Create and publish a Docker image / build-and-push-CR (push) Has been cancelled
Deploy docs / deploy (push) Has been cancelled

This commit is contained in:
Данил 2024-12-23 19:24:24 +03:00
parent d427f21b02
commit d935fad5c9

View file

@ -44,7 +44,7 @@ async def create_chart(
async with pool.acquire() as conn:
data = await conn.fetch(
'SELECT date, rate FROM currency '
'WHERE (date BETWEEN $1 AND $2) AND from_currency = $3 AND conv_currency = $4',
'WHERE (date BETWEEN $1 AND $2) AND from_currency = $3 AND conv_currency = $4 ORDER BY date',
start_date_obj,
end_date_obj,
from_currency.upper(),