From 5046eb3f4d15fa7953128f872e33791cade18cb2 Mon Sep 17 00:00:00 2001 From: Vyacheslav Kapitonov Date: Mon, 1 Jan 2024 17:25:59 +0300 Subject: [PATCH] Fix order_by for report by month --- bot/services/report_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/services/report_service.py b/bot/services/report_service.py index 2f761a7..e6b6f64 100644 --- a/bot/services/report_service.py +++ b/bot/services/report_service.py @@ -46,7 +46,7 @@ def get_report_by_month( ~Expense.is_replenishment, ) .group_by(Expense.user_id, by_month_year, Expense.unit) - .order_by(by_month_year) + .order_by(Expense.cdate_tz) .subquery() )