From d935fad5c9e98c972ae6145e84908da5688af2d2 Mon Sep 17 00:00:00 2001 From: Redume Date: Mon, 23 Dec 2024 19:24:24 +0300 Subject: [PATCH] fix(chart): Fixed sorting by date --- chart/function/create_chart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/function/create_chart.py b/chart/function/create_chart.py index fe68a3d..bcafb81 100644 --- a/chart/function/create_chart.py +++ b/chart/function/create_chart.py @@ -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(),