Refactor states naming
This commit is contained in:
parent
5e6ea7be27
commit
cfcb2b2535
|
@ -10,7 +10,7 @@ def register_projects_handlers(dp: Dispatcher):
|
|||
create.ask_for_project_fields, Text("Создать проект")
|
||||
)
|
||||
dp.register_message_handler(
|
||||
create.create_project, state=ProjectStates.set_fields
|
||||
create.create_project, state=ProjectStates.create
|
||||
)
|
||||
|
||||
dp.register_message_handler(
|
||||
|
|
|
@ -9,7 +9,7 @@ from services.repositories import Repos, ProjectRepo
|
|||
|
||||
|
||||
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(
|
||||
"Название проекта: Превращение песиков в котиков\n\n"
|
||||
"Описание: Наши цели прямы и понятны! Мы хотим написать "
|
||||
|
|
|
@ -2,5 +2,5 @@ from aiogram.dispatcher.filters.state import State, StatesGroup
|
|||
|
||||
|
||||
class ProjectStates(StatesGroup):
|
||||
set_fields = State()
|
||||
create = State()
|
||||
search = State()
|
||||
|
|
Reference in a new issue