add 'job_title' column to workers table
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
2025-08-26 22:04:13 +03:00
parent 173e8959ea
commit 20aefeb110
4 changed files with 16 additions and 10 deletions

View File

@@ -62,9 +62,8 @@ async def orders_menu(message: Message):
async def get_order_worker_id(callback: CallbackQuery, state: FSMContext):
await state.set_state(OrderForm.worker_id)
async with async_session_() as session:
async with session.begin():
result = await session.execute(select(Worker.name, Worker.telegram_id))
workers = result.all()
result = await session.execute(select(Worker.name, Worker.telegram_id).where(Worker.job_title == "Сборщик"))
workers = result.all()
await callback.message.answer("Введите сборщика ответственного за заказ:",
reply_markup=create_inline_kb(
**{f"set_worker_in_order_{tg_id}": name for name, tg_id in workers}))