Private
Public Access
1
0
This commit is contained in:
2025-01-19 12:32:32 +01:00
parent 3031a6f8f6
commit 48f363c0e4
2 changed files with 5 additions and 0 deletions

View File

@@ -571,6 +571,9 @@ def check_tp_workout_id(workout, location, attempts=5, debug=False, **kwargs): #
def handle_workout_tp_upload(w, thetoken, tcxfilename, debug=False, **kwargs): # pragma: no cover
tpid = 0
r = w.user
dologging('tp_export.log','uploading workout {workoutid} to trainingpeaks for user {id}'.format(id=r.id,workoutid=w.id))
if not tcxfilename:
return 0
@@ -589,6 +592,7 @@ def handle_workout_tp_upload(w, thetoken, tcxfilename, debug=False, **kwargs): #
w.save()
return 0
dologging('tp_export.log','uploading workout {workoutid} to trainingpeaks for user {id} succeeded'.format(id=r.id,workoutid=w.id))
w.uploadedtotp = res
record = create_or_update_syncrecord(w.user, w, tpid=tpid)
tpid = res