From 3891eff2242b9d74666b652aaa37361ca59eea27 Mon Sep 17 00:00:00 2001 From: Vladless Date: Tue, 3 Jun 2025 03:37:25 +0300 Subject: [PATCH] sort tariffs by ID --- handlers/admin/users/users_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/admin/users/users_handler.py b/handlers/admin/users/users_handler.py index e90e560a..5f1ed39d 100644 --- a/handlers/admin/users/users_handler.py +++ b/handlers/admin/users/users_handler.py @@ -623,7 +623,7 @@ async def handle_user_choose_tariff( result = await session.execute( select(Tariff) .where(Tariff.group_code == group_code, Tariff.is_active == True) - .order_by(Tariff.duration_days) + .order_by(Tariff.id) ) tariffs = result.scalars().all()