add case where no user is logged in

This commit is contained in:
Bjoern Gruening
2016-10-13 23:28:02 +02:00
parent f4dc38a54d
commit 3aadd84b80
@@ -1,2 +1,6 @@
def main(trans, webhook):
return {'username': trans.user.username}
if trans.user:
user = trans.user.username
else:
user = 'No user is logged in.'
return {'username': user}