fix state value
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-09-26 22:21:47 +03:00
parent cc520caef5
commit 6549c3d70b

View File

@@ -132,7 +132,7 @@ async def search_by_item(message: Message, state: FSMContext):
async def show_order(callback: CallbackQuery, state: FSMContext, bot: Bot): async def show_order(callback: CallbackQuery, state: FSMContext, bot: Bot):
order_id = int(re.search(r"(\d+)", callback.data).group()) order_id = int(re.search(r"(\d+)", callback.data).group())
order = next(filter(lambda item: order_id == item.id, await state.get_value("search_result")), None) order = next(filter(lambda item: order_id == item.id, await state.get_value("selected_orders")), None)
if order: if order:
await callback.message.answer(text=f"Номер заказа: {order.id}\n" await callback.message.answer(text=f"Номер заказа: {order.id}\n"