sporttracks callback
This commit is contained in:
@@ -145,7 +145,7 @@ def do_refresh_token(refreshtoken):
|
||||
data=post_data,
|
||||
headers=headers)
|
||||
|
||||
if response.status_code == 200:
|
||||
if response.status_code == 200 or response.status_code == 201:
|
||||
token_json = response.json()
|
||||
thetoken = token_json['access_token']
|
||||
expires_in = token_json['expires_in']
|
||||
@@ -316,9 +316,7 @@ def workout_tp_upload(user,w):
|
||||
)
|
||||
if res == 0:
|
||||
message = "Upload to TrainingPeaks failed with status code "+str(status_code)+": "+reason
|
||||
w.uploadedtotp = -1
|
||||
w.tpid = -1
|
||||
w.save()
|
||||
try:
|
||||
os.remove(tcxfile)
|
||||
except WindowsError:
|
||||
|
||||
Reference in New Issue
Block a user