From c0e9152f4f852b004d3fcbd111a1365eef7b43c7 Mon Sep 17 00:00:00 2001 From: Redume Date: Sat, 17 May 2025 18:24:45 +0300 Subject: [PATCH] chore: delete garbadge line --- commands/settings.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/commands/settings.py b/commands/settings.py index 54ecb06..7877914 100644 --- a/commands/settings.py +++ b/commands/settings.py @@ -41,8 +41,7 @@ async def get_user_locale(user_id: int) -> dict: data = await db.fetch( 'SELECT lang FROM users WHERE user_id = $1', user_id ) - lang = data.get('lang', 'en') - return i18n.get_locale(lang) + return i18n.get_locale(data.get('lang', 'en')) def build_options_keyboard( @@ -252,7 +251,7 @@ async def show_chart_settings(callback: CallbackQuery): locale = i18n.get_locale(lang) chart_status = bool(data.get("chart", 1)) - period = data.get("chart_period") or "week" + period = data.get("chart_period") status_text = locale.get("enabled") \ if chart_status \ @@ -305,7 +304,7 @@ async def change_chart_period(callback: CallbackQuery): lang = data.get("lang", "en") locale = i18n.get_locale(lang) - current_period = data.get("chart_period") or "week" + current_period = data.get("chart_period") keyboard = build_options_keyboard( options=PERIOD_OPTIONS,