bug fixes - loading nonexisting workout
This commit is contained in:
@@ -447,8 +447,12 @@ def get_username(access_token):
|
||||
|
||||
me_json = response.json()
|
||||
|
||||
try:
|
||||
res = me_json['data']['username']
|
||||
except KeyError:
|
||||
res = None
|
||||
|
||||
return me_json['data']['username']
|
||||
return res
|
||||
|
||||
# Get user id, having access token
|
||||
# Handy for checking if the API access is working
|
||||
|
||||
Reference in New Issue
Block a user