From 67911ffdea8ba87a4596d4ff863e28aba83d6d2d Mon Sep 17 00:00:00 2001 From: makdenis Date: Thu, 7 Dec 2017 00:10:55 +0300 Subject: [PATCH] taskkeyboard is fixed --- services/state_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/state_service.py b/services/state_service.py index e0f2052..dc8e2c6 100644 --- a/services/state_service.py +++ b/services/state_service.py @@ -58,8 +58,8 @@ def all_tasks_state(bot, update, context): else: keyboard = [] - for task, id in zip(tasks_to_show,user_tasks): - keyboard.append([InlineKeyboardButton(str(task), callback_data=str(id.get_id()))]) + for task_as_string, task_object in zip(tasks_to_show,user_tasks): + keyboard.append([InlineKeyboardButton(str(task_as_string), callback_data=str(task_object.get_id()))]) reply_markup = InlineKeyboardMarkup(keyboard) update.message.reply_text(message_source[lang]['your_tasks'].format(first_name),reply_markup=reply_markup) @@ -73,8 +73,8 @@ def select_lang_state(bot, update, context): if user: reply_msg += ', ' + user.get_first_name() reply_msg += "\nSelect language:" - keyboard = [[InlineKeyboardButton("Русский", callback_data=Language.RUS), - InlineKeyboardButton("English", callback_data=Language.ENG)], + keyboard = [[InlineKeyboardButton("Русский", callback_data=Language.RUS.value), + InlineKeyboardButton("English", callback_data=Language.ENG.value)], ] reply_markup = InlineKeyboardMarkup(keyboard) update.message.reply_text(reply_msg, reply_markup=reply_markup)