Update inline.py

This commit is contained in:
Egor
2025-12-30 18:11:56 +04:00
committed by GitHub
parent c9c25613af
commit 63ec894615

View File

@@ -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)