From c39628561e2d1306fde971643c430645696a1765 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 15 Jul 2020 21:24:10 +0200 Subject: [PATCH] refresh --- rowers/stravastuff.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rowers/stravastuff.py b/rowers/stravastuff.py index f01ee8a0..c06cbdef 100644 --- a/rowers/stravastuff.py +++ b/rowers/stravastuff.py @@ -149,8 +149,7 @@ def set_strava_athlete_id(user): s = "Token doesn't exist. Need to authorize" return custom_exception_handler(401,s) elif (r.stravatokenexpirydate is None or timezone.now()+timedelta(seconds=3599)>r.stravatokenexpirydate): - s = "Token expired. Needs to refresh." - return custom_exception_handler(401,s) + token = imports_open(user,oauth_data) else: authorizationstring = str('Bearer ' + r.stravatoken) headers = {'Authorization': authorizationstring,