From 51f2c660e8f6fca48897d053823c1bd3f7ed25b7 Mon Sep 17 00:00:00 2001 From: gy9vin Date: Wed, 22 Oct 2025 09:35:22 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=BE=D0=B9=20=D0=BF=D0=BE=D0=BA=D1=83=D0=BF?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20=D0=B2?= =?UTF-8?q?=D1=81=D0=B5=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=D1=81=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/keyboards/inline.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/keyboards/inline.py b/app/keyboards/inline.py index 471d26ee..46a64f05 100644 --- a/app/keyboards/inline.py +++ b/app/keyboards/inline.py @@ -329,7 +329,7 @@ def get_main_menu_keyboard( and getattr(current_subscription, "is_active", False) ) simple_purchase_button = None - if settings.SIMPLE_SUBSCRIPTION_ENABLED and not has_active_paid_subscription: + if settings.SIMPLE_SUBSCRIPTION_ENABLED: simple_purchase_button = InlineKeyboardButton( text=texts.MENU_SIMPLE_SUBSCRIPTION, callback_data="simple_subscription_purchase", @@ -346,9 +346,6 @@ def get_main_menu_keyboard( subscription_buttons.append( InlineKeyboardButton(text=texts.MENU_BUY_SUBSCRIPTION, callback_data="menu_buy") ) - if simple_purchase_button: - subscription_buttons.append(simple_purchase_button) - simple_purchase_button = None if subscription_buttons: paired_buttons.extend(subscription_buttons) From 8cac442de1351d68f5c35694e23b1fae9f4e7ce4 Mon Sep 17 00:00:00 2001 From: gy9vin Date: Wed, 22 Oct 2025 13:59:20 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=A4=D0=98=D0=9A=D0=A1=20=D0=9F=D0=A0?= =?UTF-8?q?=D0=9E=D0=A1=D0=A2=D0=9E=D0=99=20=D0=9F=D0=9E=D0=9A=D0=A3=D0=9F?= =?UTF-8?q?=D0=9A=D0=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/handlers/subscription/purchase.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/handlers/subscription/purchase.py b/app/handlers/subscription/purchase.py index 42a48741..7b51db85 100644 --- a/app/handlers/subscription/purchase.py +++ b/app/handlers/subscription/purchase.py @@ -2673,7 +2673,8 @@ async def _extend_existing_subscription( current_subscription.device_limit = device_limit # Если указан squad_uuid, добавляем его к существующим серверам if squad_uuid and squad_uuid not in current_subscription.connected_squads: - current_subscription.connected_squads.append(squad_uuid) + # Используем += для безопасного добавления в список SQLAlchemy + current_subscription.connected_squads = current_subscription.connected_squads + [squad_uuid] else: # Для обычной подписки просто продлеваем # Обновляем трафик и устройства, если нужно @@ -2683,7 +2684,8 @@ async def _extend_existing_subscription( current_subscription.device_limit = device_limit # Если указан squad_uuid и его ещё нет в подписке, добавляем if squad_uuid and squad_uuid not in current_subscription.connected_squads: - current_subscription.connected_squads.append(squad_uuid) + # Используем += для безопасного добавления в список SQLAlchemy + current_subscription.connected_squads = current_subscription.connected_squads + [squad_uuid] # Продлеваем подписку if current_subscription.end_date > current_time: