Private
Public Access
1
0

Merge branch 'release/v13.46'

This commit is contained in:
Sander Roosendaal
2020-07-15 21:25:06 +02:00

View File

@@ -149,8 +149,7 @@ def set_strava_athlete_id(user):
s = "Token doesn't exist. Need to authorize" s = "Token doesn't exist. Need to authorize"
return custom_exception_handler(401,s) return custom_exception_handler(401,s)
elif (r.stravatokenexpirydate is None or timezone.now()+timedelta(seconds=3599)>r.stravatokenexpirydate): elif (r.stravatokenexpirydate is None or timezone.now()+timedelta(seconds=3599)>r.stravatokenexpirydate):
s = "Token expired. Needs to refresh." token = imports_open(user,oauth_data)
return custom_exception_handler(401,s)
else: else:
authorizationstring = str('Bearer ' + r.stravatoken) authorizationstring = str('Bearer ' + r.stravatoken)
headers = {'Authorization': authorizationstring, headers = {'Authorization': authorizationstring,