From 48f363c0e469c5f48eb7733dceb59ea4cf3459b3 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 19 Jan 2025 12:32:32 +0100 Subject: [PATCH] fdf --- rowers/integrations/.#trainingpeaks.py | 1 + rowers/tasks.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 120000 rowers/integrations/.#trainingpeaks.py diff --git a/rowers/integrations/.#trainingpeaks.py b/rowers/integrations/.#trainingpeaks.py new file mode 120000 index 00000000..5317f650 --- /dev/null +++ b/rowers/integrations/.#trainingpeaks.py @@ -0,0 +1 @@ +sander@rowsandall-2.17364:1733469196 \ No newline at end of file diff --git a/rowers/tasks.py b/rowers/tasks.py index ca5c7518..5903e38b 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -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