Update pricing.py

This commit is contained in:
Egor
2026-01-13 16:30:52 +03:00
committed by GitHub
parent 4730cf30e9
commit 6937bcbc3d

View File

@@ -610,8 +610,9 @@ def _build_period_options_section(language: str) -> Tuple[str, types.InlineKeybo
lang_code = _language_code(language)
suffix = "д" if lang_code == "ru" else "d"
available_subscription = set(settings.get_available_subscription_periods())
available_renewal = set(settings.get_available_renewal_periods())
# Используем методы без фильтрации по ценам для админки
available_subscription = set(settings.get_configured_subscription_periods())
available_renewal = set(settings.get_configured_renewal_periods())
subscription_options = (14, 30, 60, 90, 180, 360)
renewal_options = (30, 60, 90, 180, 360)
@@ -1335,11 +1336,13 @@ async def toggle_period_option(
texts = get_texts(db_user.language)
if target == "subscription":
current = set(settings.get_available_subscription_periods())
# Используем метод без фильтрации по ценам для админки
current = set(settings.get_configured_subscription_periods())
options = {14, 30, 60, 90, 180, 360}
setting_key = "AVAILABLE_SUBSCRIPTION_PERIODS"
elif target == "renewal":
current = set(settings.get_available_renewal_periods())
# Используем метод без фильтрации по ценам для админки
current = set(settings.get_configured_renewal_periods())
options = {30, 60, 90, 180, 360}
setting_key = "AVAILABLE_RENEWAL_PERIODS"
else: