Refactor states naming

This commit is contained in:
LoRiot 2022-10-22 15:35:19 +03:00
parent 5e6ea7be27
commit cfcb2b2535
3 changed files with 3 additions and 3 deletions

View file

@ -10,7 +10,7 @@ def register_projects_handlers(dp: Dispatcher):
create.ask_for_project_fields, Text("Создать проект") create.ask_for_project_fields, Text("Создать проект")
) )
dp.register_message_handler( dp.register_message_handler(
create.create_project, state=ProjectStates.set_fields create.create_project, state=ProjectStates.create
) )
dp.register_message_handler( dp.register_message_handler(

View file

@ -9,7 +9,7 @@ from services.repositories import Repos, ProjectRepo
async def ask_for_project_fields(message: types.Message, state: FSMContext): async def ask_for_project_fields(message: types.Message, state: FSMContext):
await state.set_state(ProjectStates.set_fields) await state.set_state(ProjectStates.create)
await message.reply( await message.reply(
"Название проекта: Превращение песиков в котиков\n\n" "Название проекта: Превращение песиков в котиков\n\n"
"Описание: Наши цели прямы и понятны! Мы хотим написать " "Описание: Наши цели прямы и понятны! Мы хотим написать "

View file

@ -2,5 +2,5 @@ from aiogram.dispatcher.filters.state import State, StatesGroup
class ProjectStates(StatesGroup): class ProjectStates(StatesGroup):
set_fields = State() create = State()
search = State() search = State()