From 63ec894615e50132ea3c32d6501a34eff1e65db8 Mon Sep 17 00:00:00 2001 From: Egor Date: Tue, 30 Dec 2025 18:11:56 +0400 Subject: [PATCH] Update inline.py --- app/keyboards/inline.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/keyboards/inline.py b/app/keyboards/inline.py index 84001a7f..ae22facc 100644 --- a/app/keyboards/inline.py +++ b/app/keyboards/inline.py @@ -511,6 +511,7 @@ def get_main_menu_keyboard( if ( settings.BUY_TRAFFIC_BUTTON_VISIBLE and settings.is_traffic_topup_enabled() + and not settings.is_traffic_topup_blocked() and subscription and not subscription.is_trial and (subscription.traffic_limit_gb or 0) > 0 @@ -1134,10 +1135,10 @@ def get_subscription_period_keyboard( def get_traffic_packages_keyboard(language: str = DEFAULT_LANGUAGE) -> InlineKeyboardMarkup: import logging logger = logging.getLogger(__name__) - + from app.config import settings - - if settings.is_traffic_fixed(): + + if settings.is_traffic_topup_blocked(): return get_back_keyboard(language) logger.info(f"🔍 RAW CONFIG: '{settings.TRAFFIC_PACKAGES_CONFIG}'") @@ -1863,8 +1864,8 @@ def get_reset_traffic_confirm_keyboard( missing_kopeks: int = 0, ) -> InlineKeyboardMarkup: from app.config import settings - - if settings.is_traffic_fixed(): + + if settings.is_traffic_topup_blocked(): return get_back_keyboard(language) texts = get_texts(language)