Skip to content

Commit

Permalink
taskkeyboard is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
makdenis committed Dec 6, 2017
1 parent e2031ac commit 67911ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions services/state_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 67911ff

Please sign in to comment.