Forgot returns

This commit is contained in:
Sijmen 2017-11-10 19:13:38 +01:00
parent 8cdbf94d90
commit 597ee35fe3

2
app.py
View file

@ -61,6 +61,7 @@ async def cmd_tasks(message):
tasks = await api.get_tasks(token) tasks = await api.get_tasks(token)
if not tasks: if not tasks:
await message.chat.message('Je hebt geen taken!') await message.chat.message('Je hebt geen taken!')
return
else: else:
group_id = VIA_GROUPS.get(message.chat.id) group_id = VIA_GROUPS.get(message.chat.id)
if group_id is None: if group_id is None:
@ -71,6 +72,7 @@ async def cmd_tasks(message):
tasks = await api.get_group_user_tasks(token, group_id) tasks = await api.get_group_user_tasks(token, group_id)
if not tasks: if not tasks:
await message.chat.message('Je hebt geen taken voor deze groep!') await message.chat.message('Je hebt geen taken voor deze groep!')
return
msg = messages.tasks_message(tasks, is_group) msg = messages.tasks_message(tasks, is_group)
await message.chat.message(msg, parse_mode='HTML') await message.chat.message(msg, parse_mode='HTML')