🐛 Исправление: await перед get_busy_times + возврат emoji
- booking.py: добавлен await перед get_busy_times (ошибка TypeError: coroutine is not iterable) - menu.py: возвращены emoji вместо текстовых меток - time_slots.py: возвращены emoji ❌/✅ вместо [X]/[V] - Проблема была в том, что booking_service использует async def, а вызов в booking.py был без await
This commit is contained in:
@@ -8,9 +8,9 @@ def get_time_keyboard(busy_times):
|
||||
for slot in TIME_SLOTS:
|
||||
busy = slot in busy_times
|
||||
if busy:
|
||||
label = "[X] " + slot
|
||||
label = "\u274c" + " " + slot
|
||||
else:
|
||||
label = "[V] " + slot
|
||||
label = "\u2705" + " " + slot
|
||||
row.append(InlineKeyboardButton(text=label, callback_data="time_" + slot))
|
||||
if len(row) == 3:
|
||||
buttons.append(row)
|
||||
|
||||
Reference in New Issue
Block a user