From 8a2bd61855724b9e934aef88c7f3a7bf39957f09 Mon Sep 17 00:00:00 2001 From: Vladislav Mikhaylyuck <39564937+WhiteHodok@users.noreply.github.com> Date: Wed, 23 Aug 2023 23:00:50 +0600 Subject: [PATCH] Features-A8-HotFix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Фикс стейтов при создании опроса --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 3c8099d..35e16e4 100644 --- a/main.py +++ b/main.py @@ -339,6 +339,8 @@ async def survey_web_app(message: types.ContentType.WEB_APP_DATA, state: FSMCont supabase.table('TaskCollection').insert( {'name': name, 'description': description, 'photo': photo, 'counter': counter, 'url': url, 'numberPoints': numberPoints, 'rightAnswers': rightAnswers}).execute() + await state.finish() + await EventMakerPanel.taskmenu.set() @dp.message_handler(text='⬅️Назад в меню', state=EventMakerPanel.taskmenu) async def back_to_event_main_menu(message: types.Message, state: FSMContext): @@ -1128,6 +1130,8 @@ async def survey_web_app(message: types.ContentType.WEB_APP_DATA , state: FSMCon description = data.get("description") photo = data.get("photo") supabase.table('TaskCollection').insert({'name': name, 'description': description, 'photo': photo, 'counter': counter, 'url': url,'numberPoints':numberPoints, 'rightAnswers':rightAnswers}).execute() + await state.finish() + await AdminPanel.taskmenu.set() @dp.message_handler(text="⬅️Назад в меню", state=AdminPanel.taskmenu) async def back_from_rules(message: types.Message, state: FSMContext):