From 8c27e43c52217a0f5baa74a37978072ca9ba4818 Mon Sep 17 00:00:00 2001 From: Capybara-z Date: Tue, 1 Apr 2025 22:10:40 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D0=B2=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BA=D1=83=D0=BF=D0=BE?= =?UTF-8?q?=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Корректировка состояния активации купона --- handlers/coupons.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handlers/coupons.py b/handlers/coupons.py index 8632bd97..119e05e8 100644 --- a/handlers/coupons.py +++ b/handlers/coupons.py @@ -60,7 +60,9 @@ async def process_coupon_code(message: Message, state: FSMContext, session: Any) builder.row(InlineKeyboardButton(text=MAIN_MENU, callback_data="profile")) await message.answer(activation_result, reply_markup=builder.as_markup()) - await state.clear() + + if activation_result.startswith(COUPON_ACTIVATED_SUCCESS_MSG.split('.')[0]): + await state.clear() async def activate_coupon(user_id: int, coupon_code: str, session: Any):