Private
Public Access
1
0

Merge branch 'develop' into feature/icu_sessions

This commit is contained in:
2024-12-16 19:34:05 +01:00
5 changed files with 27 additions and 11 deletions

View File

@@ -18,6 +18,7 @@ from uuid import uuid4
from django.utils import timezone
from datetime import timedelta
import rowers.dataprep as dataprep
from rowers.opaque import encoder
from rowsandall_app.settings import (
INTERVALS_CLIENT_ID, INTERVALS_REDIRECT_URI, INTERVALS_CLIENT_SECRET, SITE_URL
@@ -171,6 +172,7 @@ class IntervalsIntegration(SyncIntegration):
params = {
'name': workout.name,
'description': workout.notes,
'external_id': encoder.encode_hex(workout.id),
}

View File

@@ -67,7 +67,10 @@ class TPIntegration(SyncIntegration):
except TypeError:
newnotes = 'from '+w.workoutsource+' via rowsandall.com'
row.exporttotcx(tcxfilename, notes=newnotes, sport=tpmapping[w.workouttype])
try:
row.exporttotcx(tcxfilename, notes=newnotes, sport=tpmapping[w.workouttype])
except KeyError:
row.exporttotcx(tcxfilename, notes=newnotes, sport='other')
return tcxfilename